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).
The following sample code calls a routine from our Code Library.
* BluePay PHP Sample Code
* This code sample runs a $25.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.
$accountID = "MERCHANT'S ACCOUNT ID HERE";
$secretKey = "MERCHANT'S SECRET KEY HERE";
$mode = "TEST";
// Merchant's Account ID
// Merchant's Secret Key
// Transaction Mode: TEST (can also be LIVE)
$payment = new BluePay(
// First Name: Bob
// Last Name: Tester
// Address1: 123 Test St.
// Address2: Apt #500
// City: Testville
// State: IL
// Zip: 54321
// Country: USA
'123 Test St.',
// Card Number: 4111111111111111
// Card Expire: 12/15
// Card CVV2: 123
// Phone #: 123-123-1234
// Email Address: email@example.com
// Custom ID1: 12345
// Custom ID2: 09866
// Invoice ID: 50000
// Order ID: 10023145
// Tip Amount: $6.00
// Tax Amount: $3.50
// Food Amount: $3.11
// Miscellaneous Amount: $5.00
/* RUN A $15.00 CREDIT CARD SALE */
# Read response from BluePay
echo 'Status: '. $payment->getStatus() . '<br />' .
'Message: '. $payment->getMessage() . '<br />' .
'Transaction ID: '. $payment->getTransID() . '<br />' .
'AVS Response: ' . $payment->getAVSResponse() . '<br />' .
'CVS Response: ' . $payment->getCVV2Response() . '<br />' .
'Masked Account: ' . $payment->getMaskedAccount() . '<br />' .
'Card Type: ' . $payment->getCardType() . '<br />' .
'Authorization Code: ' . $payment->getAuthCode() . '<br />';