\DPSHostedPayment
Step-by-Step: 1. Send XML transaction request (GenerateRequest) to PaymentExpress => DPSHostedPaymentForm->doPay() => DPSHostedPayment->prepareRequest() => DPSHostedPayment->processPayment() 2. Receive XML response (Request) with the URI element (encrypted URL), which you use to redirect the user to PaymentExpress so they can enter their card details 3. Cardholder enters their details and transaction is sent to your bank for authorisation. The response is given and they are redirected back to your site with the response 4. You take the "Request" parameter (encrypted URL response) in the URL string and use this in the "Response" element, to send the response request (ProcessResponse) to PaymentExpress to decrypt and receive the XML response back.
5. Receive XML response (Response) with the authorised result of the transaction.
=> DPSHostedPayment_Controller->processResponse()
Synopsis
class DPSHostedPayment
extends Payment
{
- // members
- public static string $pxAccess_Url = "https://sec.paymentexpress.com/pxpay/pxpay.aspx";
- private static $pxAccess_Userid;
- private static $pxAccess_Key;
- private static $mac_Key;
- public static string $pxPay_Url = "https://sec.paymentexpress.com/pxpay/pxaccess.aspx";
- private static $pxPay_Userid;
- private static $pxPay_Key;
- public static string $px_currency = 'NZD';
- public static $px_merchantreference = NULL;
- protected static boolean $use_iframe = false;
- public static array $db = ;
- public static array $has_one = ;
- // methods
- public void getPaymentFormFields()
- public void getPaymentFormRequirements()
- public static void set_px_access_userid()
- public static void get_px_access_userid()
- public static void set_px_access_key()
- public static void get_px_access_key()
- public static void set_mac_key()
- public static void get_mac_key()
- public static void set_px_pay_userid()
- public static void get_px_pay_userid()
- public static void set_px_pay_key()
- public static void get_px_pay_key()
- public static void set_use_iframe()
- public static void generate_txn_id()
- public void processPayment()
- protected PxPayRequest prepareRequest()
Hierarchy
Extends
- Payment
Members
private
- $mac_Key
- $pxAccess_Key
- $pxAccess_Userid
- $pxPay_Key
- $pxPay_Userid
protected
- $use_iframe
public
- $db
- $has_one
- $pxAccess_Url
- $pxPay_Url
- $px_currency
- $px_merchantreference — string
Methods
protected
- prepareRequest() — Generate a {@link PxPayRequest} object and populate it with the submitted data from a instance.
public
- generate_txn_id()
- getPaymentFormFields()
- getPaymentFormRequirements()
- get_mac_key()
- get_px_access_key()
- get_px_access_userid()
- get_px_pay_key()
- get_px_pay_userid()
- processPayment() — Executed in form submission *before* anything goes out to DPS.
- set_mac_key()
- set_px_access_key()
- set_px_access_userid()
- set_px_pay_key()
- set_px_pay_userid()
- set_use_iframe()