Class Hook_secpay

Description

Located in /sources/hooks/systems/ecommerce_via/secpay.php (line 21)


	
			
Method Summary
?boolean auto_cancel (string $trans_id)
array do_transaction (?ID_TEXT $trans_id, SHORT_TEXT $name, SHORT_TEXT $card_number, SHORT_TEXT $amount, SHORT_TEXT $expiry_date, integer $issue_number, SHORT_TEXT $start_date, SHORT_TEXT $card_type, SHORT_TEXT $cv2, [?integer $length = NULL], [?ID_TEXT $length_units = NULL])
string generate_trans_id ()
URLPATH get_ipn_url ()
float get_transaction_fee (float $amount)
tempcode make_cancel_button (ID_TEXT $purchase_id)
tempcode make_subscription_button (ID_TEXT $product, SHORT_TEXT $item_name, ID_TEXT $purchase_id, float $amount, integer $length, ID_TEXT $length_units, ID_TEXT $currency)
tempcode make_transaction_button (ID_TEXT $product, SHORT_TEXT $item_name, ID_TEXT $purchase_id, float $amount, ID_TEXT $currency)
tempcode nice_get_card_types ([?string $it = NULL])
?mixed store_shipping_address (AUTO_LINK $order_id)
string _get_username ()
array _translate_subscription_details (integer $length, ID_TEXT $length_units)
Methods
auto_cancel (line 177)

Find whether the hook auto-cancels (if it does, auto cancel the given trans-id).

  • return: True: yes. False: no. (NULL: cancels via a user-URL-directioning)
?boolean auto_cancel (string $trans_id)
  • string $trans_id: Transaction ID to cancel
do_transaction (line 234)

Perform a transaction.

  • return: A tuple: success (boolean), trans-id (string), message (string), raw message (string)
array do_transaction (?ID_TEXT $trans_id, SHORT_TEXT $name, SHORT_TEXT $card_number, SHORT_TEXT $amount, SHORT_TEXT $expiry_date, integer $issue_number, SHORT_TEXT $start_date, SHORT_TEXT $card_type, SHORT_TEXT $cv2, [?integer $length = NULL], [?ID_TEXT $length_units = NULL])
  • ?ID_TEXT $trans_id: The transaction ID (NULL: generate one)
  • SHORT_TEXT $name: Cardholder name
  • SHORT_TEXT $card_number: Card number
  • SHORT_TEXT $amount: Transaction amount
  • SHORT_TEXT $expiry_date: Card Expiry date
  • integer $issue_number: Card Issue number
  • SHORT_TEXT $start_date: Card Start date
  • SHORT_TEXT $card_type: Card Type
  • SHORT_TEXT $cv2: Card CV2 number (security number)
  • ?integer $length: The subscription length in the units. (NULL: not a subscription)
  • ?ID_TEXT $length_units: The length units. (NULL: not a subscription)
generate_trans_id (line 49)

Generate a transaction ID.

  • return: A transaction ID.
string generate_trans_id ()
get_ipn_url (line 39)

Get the IPN URL.

  • return: The IPN url.
URLPATH get_ipn_url ()
get_transaction_fee (line 194)

Find a transaction fee from a transaction amount. Regular fees aren't taken into account.

  • return: The fee
float get_transaction_fee (float $amount)
  • float $amount: A transaction amount.
handle_transaction (line 283)

Handle IPN's. The function may produce output, which would be returned to the Payment Gateway. The function may do transaction verification.

  • return: A long tuple of collected data.
array handle_transaction ()
make_cancel_button (line 165)

Make a subscription cancellation button.

  • return: The button
tempcode make_cancel_button (ID_TEXT $purchase_id)
  • ID_TEXT $purchase_id: The purchase ID.
make_subscription_button (line 137)

Make a subscription (payment) button.

  • return: The button
tempcode make_subscription_button (ID_TEXT $product, SHORT_TEXT $item_name, ID_TEXT $purchase_id, float $amount, integer $length, ID_TEXT $length_units, ID_TEXT $currency)
  • ID_TEXT $product: The product codename.
  • SHORT_TEXT $item_name: The human-readable product title.
  • ID_TEXT $purchase_id: The purchase ID.
  • float $amount: A transaction amount.
  • integer $length: The subscription length in the units.
  • ID_TEXT $length_units: The length units.
  • ID_TEXT $currency: The currency to use.
make_transaction_button (line 64)

Make a transaction (payment) button.

  • return: The button
tempcode make_transaction_button (ID_TEXT $product, SHORT_TEXT $item_name, ID_TEXT $purchase_id, float $amount, ID_TEXT $currency)
  • ID_TEXT $product: The product codename.
  • SHORT_TEXT $item_name: The human-readable product title.
  • ID_TEXT $purchase_id: The purchase ID.
  • float $amount: A transaction amount.
  • ID_TEXT $currency: The currency to use.
nice_get_card_types (line 205)

Get a list of card types.

  • return: The list
tempcode nice_get_card_types ([?string $it = NULL])
  • ?string $it: The card type to select by default (NULL: don't care)
store_shipping_address (line 420)

Store shipping address for orders

  • return: Address id (NULL: No address record found)
?mixed store_shipping_address (AUTO_LINK $order_id)
  • AUTO_LINK $order_id: Order id
_get_username (line 29)

Get the gateway username.

  • return: The answer.
string _get_username ()
_translate_subscription_details (line 93)

Find details for a subscription in secpay format.

  • return: A tuple: the period in secpay units, the date of the first repeat
array _translate_subscription_details (integer $length, ID_TEXT $length_units)
  • integer $length: The subscription length in the units.
  • ID_TEXT $length_units: The length units.

Documentation generated on Sun, 02 Jan 2011 23:24:09 +0000 by phpDocumentor 1.4.3