Interface MerchantCc
Merchant Credit Card processing interface. Defines all methods that a credit
card payment gateway must implement. Note: not all methods are required to
be supported.
Methods summary
public
array
|
#
processCc( array $card_info, float $amount, array $invoice_amounts = null )
Charge a credit card
Parameters
- $card_info
An array of credit card info including:
- first_name The first name on the card
- last_name The last name on the card
- card_number The card number
- card_exp The card expidation date in yyyymm format
- card_security_code The 3 or 4 digit security code of the card (if available)
- type The credit card type
- address1 The address 1 line of the card holder
- address2 The address 2 line of the card holder
- city The city of the card holder
- state An array of state info including:
- code The 2 or 3-character state code
- name The local name of the country
- country An array of country info including:
- alpha2 The 2-character country code
- alpha3 The 3-cahracter country code
- name The english name of the country
- alt_name The local name of the country
- zip The zip/postal code of the card holder
- reference_id The reference ID attached to this account given by the payment processor (optional)
- client_reference_id The reference ID for the client this payment account belongs to (optional)
- $amount
- The amount to charge this card
- $invoice_amounts
An array of invoices, each containing:
- id The ID of the invoice being processed
- amount The amount being processed for this invoice (which is included in $amount)
Returns
array An array of transaction data including:
- status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
- reference_id The reference ID for gateway-only use with this transaction (optional)
- transaction_id The ID returned by the remote gateway to identify this transaction
- message The message to be displayed in the interface in addition to the standard message for
this transaction status (optional)
|
public
array
|
#
authorizeCc( array $card_info, float $amount, array $invoice_amounts = null )
Authorize a credit card
Parameters
- $card_info
An array of credit card info including:
- first_name The first name on the card
- last_name The last name on the card
- card_number The card number
- card_exp The card expidation date in yyyymm format
- card_security_code The 3 or 4 digit security code of the card (if available)
- type The credit card type
- address1 The address 1 line of the card holder
- address2 The address 2 line of the card holder
- city The city of the card holder
- state An array of state info including:
- code The 2 or 3-character state code
- name The local name of the country
- country An array of country info including:
- alpha2 The 2-character country code
- alpha3 The 3-cahracter country code
- name The english name of the country
- alt_name The local name of the country
- zip The zip/postal code of the card holder
- $amount
- The amount to charge this card
- $invoice_amounts
An array of invoices, each containing:
- id The ID of the invoice being processed
- amount The amount being processed for this invoice (which is included in $amount)
Returns
array An array of transaction data including:
- status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
- reference_id The reference ID for gateway-only use with this transaction (optional)
- transaction_id The ID returned by the remote gateway to identify this transaction
- message The message to be displayed in the interface in addition to the standard message for
this transaction status (optional)
|
public
array
|
#
captureCc( string $reference_id, string $transaction_id, float $amount, array $invoice_amounts = null )
Capture the funds of a previously authorized credit card
Capture the funds of a previously authorized credit card
Parameters
- $reference_id
- The reference ID for the previously authorized transaction
- $transaction_id
- The transaction ID for the previously authorized transaction
- $amount
- The amount to capture on this card
- $invoice_amounts
An array of invoices, each containing:
- id The ID of the invoice being processed
- amount The amount being processed for this invoice (which is included in $amount)
Returns
array An array of transaction data including:
- status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
- reference_id The reference ID for gateway-only use with this transaction (optional)
- transaction_id The ID returned by the remote gateway to identify this transaction
- message The message to be displayed in the interface in addition to the standard message for
this transaction status (optional)
|
public
array
|
#
voidCc( string $reference_id, string $transaction_id )
Void a credit card charge
Void a credit card charge
Parameters
- $reference_id
- The reference ID for the previously authorized transaction
- $transaction_id
- The transaction ID for the previously authorized transaction
Returns
array An array of transaction data including:
- status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
- reference_id The reference ID for gateway-only use with this transaction (optional)
- transaction_id The ID returned by the remote gateway to identify this transaction
- message The message to be displayed in the interface in addition to the standard message for
this transaction status (optional)
|
public
array
|
#
refundCc( string $reference_id, string $transaction_id, float $amount )
Refund a credit card charge
Refund a credit card charge
Parameters
- $reference_id
- The reference ID for the previously authorized transaction
- $transaction_id
- The transaction ID for the previously authorized transaction
- $amount
- The amount to refund this card
Returns
array An array of transaction data including:
- status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
- reference_id The reference ID for gateway-only use with this transaction (optional)
- transaction_id The ID returned by the remote gateway to identify this transaction
- message The message to be displayed in the interface in addition to the standard message for
this transaction status (optional)
|