Customer Defined Data
This code steps you through an optional process of collecting and passing information that's not required for credit card processing but you need for your own purposes. This data is typically collected when you're processing transactions or storing payment methods.
This data can be entered by your customers or you may provide this customer-specific data. For example, customers could enter their names or you could attach an identification number that supports a process. Some fields are identified (e.g. phone number) and other fields may be tailored to support your specific requirements (e.g. Custom ID1).
# BluePay Python Sample code.
# This code sample runs a $15.00 Credit Card Sale transaction
# against a customer using test payment information.
# Optional transaction data is also sent.
# If using TEST mode, odd dollar amounts will return
# an approval and even dollar amounts will return a decline.
account_id = "Merchant's Account ID Here"
secret_key = "Merchant's Secret Key Here"
mode = "TEST"
payment = BluePay(
account_id = account_id,
secret_key = secret_key,
mode = mode
name1 = "Bob",
name2 = "Tester",
addr1 = "123 Test St.",
addr2 = "Apt #500",
city = "Testville",
state = "IL",
zipcode = "54321",
country = "USA"
card_number = "4111111111111111",
card_expire = "1215",
cvv2 = "123"
# Optional fields users can set
payment.phone = "1231231234" # Phone #
payment.email = "[email protected]" # Email Address
payment.custom_id1 = "12345" # Custom ID1
payment.custom_id2 = "09866" # Custom ID2
payment.invoice_id = "500000" # Invoice ID
payment.order_id = "10023145" # Order ID
payment.amount_tip = "6.00" # Tip Amount
payment.amount_tax = "3.50" # Tax Amount
payment.amount_food = "3.11" # Food Amount
payment.amount_misc = "5.00" # Miscellaneous Amount
payment.memo = "Enter any comments about the transaction here." # Comments
# Sale Amount: $25.00
payment.sale(amount = "25.00")
# Makes the API Request to process sale
if payment.is_successful_response(): # Read response from BluePay
print 'Transaction Status: ' + payment.status_response
print 'Transaction Message: ' + payment.message_response
print 'Transaction ID: ' + payment.trans_id_response
print 'AVS Result: ' + payment.avs_code_response
print 'CVV2 Result: ' + payment.cvv2_code_response
print 'Masked Payment Account: ' + payment.masked_account_response
print 'Card Type: ' + payment.card_type_response
print 'Auth Code: ' + payment.auth_code_response
855-812-5191 to get access to the applicable integration modules.