QuickLink to process credit cards over the Internet.
|
Public Member Functions |
| | PayJunction () |
| | Initialize the PayJunction object.
|
| | clear () |
| | Clear the current transaction information.
|
| | is_initializing () |
| | Check whether the object is being initialized.
|
| | set_transmission_repeat ($repeat) |
| | The number of time the transmission is attempted.
|
| | set_account_info ($logon, $password) |
| | Set the PayJunction account info.
|
| | set_customer_name ($first_name, $last_name=null) |
| | Set the customer first and last names.
|
| | set_customer_address ($street, $city, $state, $zip, $country) |
| | Defines the customer address.
|
| | set_invoice_id ($invoice_id) |
| | Set the identifier of this invoice.
|
| | set_notes ($notes) |
| | Set notes for this invoice.
|
| | set_security ($security) |
| | Set the transaction security dynamically.
|
| | set_transaction_info ($type, $grand_total, $tax=0, $shipping=0, $unit=PayJunction::DOLLARS) |
| | Set the transaction information.
|
| | clean_card_number ($number) |
| | Clean a credit card number.
|
| | is_valid_number ($number) |
| | Make sure that the credit card number is valid.
|
| | set_card ($number, $expiration_month, $expiration_year, $cvv2="", $present=null) |
| | Set the card information (manual).
|
| | set_track ($track, $present=true) |
| | Set the track of a credit card.
|
| | set_transaction_id ($transaction_id) |
| | Set the identifier of the transaction information to use.
|
| | set_schedule ($limit, $periodic_number, $periodic_type, $start) |
| | Defines the schedule period.
|
| | set_posture ($posture) |
| | Defines the posture of a transaction.
|
| | set_settlement () |
| | Setup the transaction for a settlement.
|
| | verify () |
| | Verify the current transaction.
|
| | process () |
| | Process the current transaction.
|
| | get_success () |
| | Check whether the last transaction was a success.
|
| | get_safe_retry () |
| | Check whether the last error means the customer can safely try again.
|
| | is_bad_card () |
| | Check whether the card should automatically be refused.
|
| | get_transaction_id () |
| | Retrieve the identifier of the last transaction.
|
| | get_transaction_result () |
| | Return the raw result from the last processing.
|
| | get_transaction_variable ($name) |
| | Get one of the transaction variables.
|
| | get_transaction_response () |
| | Get the entire body with the response.
|
| | get_error_message () |
| | Retrieve an error message for the last transaction.
|
Public Attributes |
| const | DOLLARS = 123 |
| | The unit used to pass transaction amounts.
|
| const | CENTS = 456 |
| | The unit used to pass transaction amounts.
|
| const | AUTHORIZATION = "AUTHORIZATION" |
| | The transaction type to check a card.
|
| const | AUTHORIZATION_CAPTURE = "AUTHORIZATION_CAPTURE" |
| | The transaction type to capture a card.
|
| const | CREDIT = "CREDIT" |
| | The transaction type to credit (reimburse) a card.
|
| const | SETTLE = "settle" |
| | The transaction type to settle all the transactions.
|
| const | UPDATE = "update" |
| | The transaction type to update a transaction.
|
| const | POSTURE_CAPTURE = "capture" |
| | The posture to use to capture the card.
|
| const | POSTURE_VOID = "void" |
| | The posture to use to cancel an authorization.
|
| const | POSTURE_HOLD = "hold" |
| | The posture to use to keep a card on hold.
|
| const | PERIOD_DAY = 'day' |
| | Set the period to 1 day.
|
| const | PERIOD_WEEK = 'week' |
| | Set the period to 1 week.
|
| const | PERIOD_MONTH = 'month' |
| | Set the period to 1 month.
|
| const | SECURITY_ADDRESS_MASK = 0x000F |
| | Mask used to extract the address matching scheme.
|
| const | SECURITY_MATCH_MAX = 0x000A |
| | The maximum match number, inclusive.
|
| const | SECURITY_IGNORE_ADDRESS_AND_ZIP = 0x0000 |
| | Do not match the address and zip code.
|
| const | SECURITY_MATCH_ADDRESS_OR_ZIP = 0x0001 |
| | Match either the address or the zip code.
|
| const | SECURITY_MATCH_ADDRESS_AND_ZIP = 0x0002 |
| | Match both, the address and the zip code.
|
| const | SECURITY_MATCH_ZIP = 0x0003 |
| | Match the zip code.
|
| const | SECURITY_MATCH_ADDRESS_OR_ZIP9 = 0x0004 |
| | Match the address or 9 digits zip code.
|
| const | SECURITY_MATCH_ADDRESS_OR_ZIP5 = 0x0005 |
| | Match the address or 5 digits zip code.
|
| const | SECURITY_MATCH_ADDRESS = 0x0006 |
| | Match the address only.
|
| const | SECURITY_MATCH_ADDRESS_AND_ZIP9 = 0x0007 |
| | Match the address and the zip code, zip must be 9 digits.
|
| const | SECURITY_MATCH_ADDRESS_AND_ZIP5 = 0x0008 |
| | Match the address and the zip code, zip must be 5 digits.
|
| const | SECURITY_MATCH_ZIP9 = 0x0009 |
| | Match the zip code, must be 9 digits.
|
| const | SECURITY_MATCH_ZIP5 = 0x000A |
| | Match the zip code, must be 5 digits.
|
| const | SECURITY_VERIFY_CVV2 = 0x0100 |
| | Match the CVV2 exactly.
|
| const | SECURITY_SKIP_CVV2 = 0x0200 |
| | Ignore the CVV2 comparison.
|
| const | SECURITY_DO_PREAUTH = 0x0400 |
| | Do a pre-authorization with 1 dollar.
|
| const | SECURITY_DIRECT_AUTH = 0x0800 |
| | Do a direct authorization, no pre-authorization.
|
| const | SECURITY_TEST_AVS = 0x1000 |
| | Test the address and zip.
|
| const | SECURITY_IGNORE_AVS = 0x2000 |
| | Ignore the address and zip.
|
| const | SECURITY_TEST_CVV2 = 0x4000 |
| | Take the test of the CVV2 code in account.
|
| const | SECURITY_IGNORE_CVV2 = 0x8000 |
| | Ingore the test of the CVV2 code.
|
| const | SECURITY_ALL_MASK = 0xFF0F |
| | All the possible security flags.
|
| const | RESULT_APPROVAL_CODE = "dc_approval_code" |
| | The raw bank approval code.
|
| const | RESULT_ADDR_CUSTOMER_CITY = "dc_card_city" |
| | The name of the city where the customer lives.
|
| const | RESULT_ADDR_CUSTOMER_COUNTRY = "dc_card_country" |
| | The country where the customer lives.
|
| const | RESULT_ADDR_CUSTOMER_STATE = "dc_card_state" |
| | The state where the customer lives if any.
|
| const | RESULT_ADDR_CUSTOMER_STREET = "dc_card_address" |
| | The street address where the customer lives.
|
| const | RESULT_ADDR_CUSTOMER_ZIPCODE = "dc_card_zipcode" |
| | The zip code where the customer lives.
|
| const | RESULT_ADDR_MERCHANT_CITY = "dc_merchant_city" |
| | The city of your company.
|
| const | RESULT_ADDR_MERCHANT_STATE = "dc_merchant_state" |
| | The state of your company.
|
| const | RESULT_ADDR_MERCHANT_STREET = "dc_merchant_address" |
| | The street address of your company.
|
| const | RESULT_ADDR_MERCHANT_ZIPCODE = "dc_merchant_zip" |
| | The zip code of your company.
|
| const | RESULT_CARD_BRAND = "dc_card_brand" |
| | Brand of card used for this payment.
|
| const | RESULT_CARD_EXPIRATION_DATE = "dc_card_exp" |
| | The expiration date of the card.
|
| const | RESULT_CARD_NUMBER = "dc_card_number" |
| | The card number.
|
| const | RESULT_CHARGE_BASE = "dc_base_amount" |
| | The base amount of the transaction.
|
| const | RESULT_CHARGE_CASHBACK = "dc_cashback_amount" |
| | The cashback amount for this transaction.
|
| const | RESULT_CHARGE_GRAND_TOTAL = "dc_capture_amount" |
| | The total amount captured on the card.
|
| const | RESULT_CHARGE_SHIPPING = "dc_shipping_amount" |
| | The shipping amount.
|
| const | RESULT_CHARGE_TAX = "dc_tax_amount" |
| | The tax amount.
|
| const | RESULT_CUSTOMER_NAME = "dc_card_name" |
| | The name of the cusomter.
|
| const | RESULT_DEVICE_ID = "dc_device_id" |
| | The identifier of the device used for this transaction.
|
| const | RESULT_INVOICE_NUMBER = "dc_invoice_number" |
| | Your invoice number.
|
| const | RESULT_MERCHANT_NAME = "dc_merchant_name" |
| | The name of your company.
|
| const | RESULT_MERCHANT_PHONE = "dc_merchant_phone" |
| | The phone number of your company.
|
| const | RESULT_NOTES = "dc_notes" |
| | A copy of you notes.
|
| const | RESULT_POSTURE = "dc_posture" |
| | Defines the posture used in this transaction.
|
| const | RESULT_RESPONSE_MESSAGE = "dc_response_message" |
| | The response in an English message.
|
| const | RESULT_TRANSACTION_ACTION = "dc_transaction_action" |
| | The action that was taken in the last transaction.
|
| const | RESULT_TRANSACTION_DATE = "dc_transaction_date" |
| | The date when the transaction took place.
|
| const | RESULT_TRANSACTION_ID = "dc_transaction_id" |
| | The transaction identifier.
|
| const | RESULT_TRANSACTION_RESULT = "dc_response_code" |
| | The code returned by PayJunction.
|
| const | CARD_BRAND_VISA = "VSA" |
| | The VISA brand.
|
| const | CARD_BRAND_MASTERCARD = "MC" |
| | The Mastercard brand.
|
| const | CARD_BRAND_DISCOVER = "NVS" |
| | The Discover brand.
|
| const | CARD_BRAND_AMERICANEXPRESS = "AMX" |
| | The American Express brand.
|
(The document is proprietary. You can check out
).
This class generates the necessary messages to process credit cards. All you have to do is setup some parameters.