\WorldpayPayment
Sub-class of Payment that supports Worldpay as its payment processor
Configuration
=============
You need to define the installation ID, test mode and callback
password in _config.php of your project:
WorldpayPayment::set_installation_id(111111);
WorldpayPayment::set_testmode(100);
WorldpayPayment::set_callback_password(blahblah);
Synopsis
class WorldpayPayment
extends Payment
{
- // members
- protected static string $privacy_link = 'http://www.worldpay.com/about_us/index.php?page=privacy';
- protected static string $logo = 'payment/images/payments/worldpay.gif';
- protected static string $url = 'https://select.worldpay.com/wcc/purchase';
- protected static string $test_url = 'https://select-test.worldpay.com/wcc/purchase';
- protected static boolean $test_mode = false;
- protected static $test_mode_name;
- protected static $installation_id;
- protected static $result_file;
- protected static $merchant_code;
- protected static $authorisation_mode;
- protected static $authorisation_valid_from;
- protected static $authorisation_valid_to;
- public static $callback_password;
- // Inherited members from Payment
- public static array $db;
- public static array $has_one;
- protected static array $supported_methods;
- public static array $create_table_options;
- protected static string $site_currency;
- // methods
- protected static void set_test_mode()
- public static void set_test_mode_refused_transaction()
- public static void set_test_mode_authorised_transaction()
- public static void set_test_mode_error_transaction()
- public static void set_test_mode_captured_transaction()
- public static void set_installation_id()
- public static void set_result_file()
- public static void set_merchant_code()
- public static void set_authorisation_mode_full()
- public static void set_authorisation_mode_pre()
- public static void set_authorisation_mode_post()
- public static void set_authorisation_valid_from()
- public static void set_authorisation_valid_to()
- public static void set_callback_password()
- public void getPaymentFormFields()
- public void getPaymentFormRequirements()
- public void processPayment()
- public void WorldPayForm()
- // Inherited methods from Payment
- public static void set_site_currency()
- public static string site_currency()
- public static void set_supported_methods()
- public static array get_supported_methods()
- public void populateDefaults()
- public void setClientIP()
- public string PaymentMethod()
- public static FieldSet combined_form_fields()
- public static An combined_form_requirements()
- public FieldSet getPaymentFormFields()
- public array getPaymentFormRequirements()
- public void processPayment()
- public void getForm()
- public void payAsRecurring()
- public void handleError()
- public void PaidObject()
Hierarchy
Extends
Members
protected
- $installation_id
- $logo
- $merchant_code
- $privacy_link
- $result_file
- $site_currency
—
string
The currency code used for payments. - $supported_methods
—
array
Instances of Payment supported (usable) on this site. - $test_mode
- $test_mode_name
- $test_url
- $url
public
- $callback_password
-
$create_table_options
Make payment table transactional. -
$db
Incomplete (default): Payment created but nothing confirmed as successful Success: Payment successful Failure: Payment failed during process Pending: Payment awaiting receipt/bank transfer etc - $has_one
Methods
protected
public
- WorldPayForm()
- getPaymentFormFields()
- getPaymentFormRequirements()
- processPayment()
- set_callback_password()
- set_installation_id()
- set_merchant_code()
- set_result_file()
- set_test_mode_captured_transaction()
- set_test_mode_error_transaction()
- set_test_mode_refused_transaction()
Inherited from Payment
public
- PaidObject()
- PaymentMethod() — Returns the Payment type currently in use.
- combined_form_fields() — Return a set of payment fields from all enabled payment methods for this site, given the . {@link Payment::set_supported_methods()} is used to define which methods are available.
- combined_form_requirements() — Return the form requirements for all the payment methods.
- getForm()
- getPaymentFormFields() — Return the payment form fields that should be shown on the checkout order form for the payment type. Example: for {@link DPSPayment}, this would be a set of fields to enter your credit card details.
- getPaymentFormRequirements() — Define what fields defined in {@link Order->getPaymentFormFields()} should be required.
- get_supported_methods()
- handleError()
- payAsRecurring()
- populateDefaults()
- processPayment() — Perform payment processing for the type of payment. For example, if this was a credit card payment type, you would perform the data send off to the payment gateway on this function for your payment subclass.
- setClientIP() — Set the IP address of the user to this payment record.
- set_site_currency() — Set the currency code that this site uses.
- set_supported_methods() — Set the payment types that this site supports.
- site_currency() — Return the site currency in use.