Ecommerce Templates > PHP Version Help > Payment Processors > SecurePay


SecurePay and Ecommerce Templates


SecurePay and Ecommerce Templates

Before installing and using this module, you will need to set up an account with SecurePay - SecureFrame.

Configuring SecurePay with Ecommerce Templates

  1. Download the file securepayphp.zip from the downloads page. The zip file contains two files, customppsend.php and customppreturn.php. These contain all the information you need for the integration for the PHP version of Ecommerce Templates.
  2. Unzip the download and place the two PHP files in your vsadmin/inc/ folder, overwriting the existing files - agree to overwrite if prompted.
  3. Log in to your Ecommerce Templates store admin area (http://store_url/vsadmin/login.php).
  4. Click Edit Payment Providers option
  5. Locate the payment provider listed as Custom and click on the Modify button
  6. Fill in the details as shown below
    • Enter a description of this module in Show As field. This description will be displayed to the shopper under the payments option
    • Check Enabled
    • Check Demo Mode if you are testing the module. When running in Demo Mode the credit card will NOT be charged. The SecurePay system will simply simulate credit card processing functionality. Make sure this option is unticked before making your store open for business.
    • Enter your SecurePay Merchant ID in the Data 1 field.
    • Enter your Transaction Password in the Data 2 field
    • Data 3 is for the Transaction Type - see below
    • Hit the Submit button

SecurePay store admin

Testing the module

Go through your store as a customer and purchase a product. Use 4444333322221111 for the credit card number, 123 as the CVV/Security Code and any future date as the expiry date.

Transaction Type

Enter a value from the following list in the Data 3 field, the default, and most common will be zero.

0 - PAYMENT: A card payment/purchase transaction. Note: This is the only accepted transaction type for PayPal payments. 
1 - PREAUTH: Used to pre-authorise an amount on a card. The result parameters include the "preauthid" which must be stored and used when completing the pre-authorisation 
2 – PAYMENT with FRAUDGUARD: A card payment/purchase transaction with the optional FraudGuard service 
3 – PREAUTH with FRAUDGUARD: A card preauthorisation transaction with the optional FraudGuard service 
4 – PAYMENT with 3D Secure: A card payment/purchase transaction with the optional 3D Secure service 
5 – PREAUTH with 3D Secure: A card preauthorisation transaction with the optional 3D Secure service 
6 – PAYMENT with FRAUDGUARD and 3D Secure: A card payment/purchase transaction with the optional FraudGuard and 3D Secure services 
7 – PREAUTH with FRAUDGUARD and 3D Secure: A card preauthorisation transaction with the optional FraudGuard and 3D Secure services

That is, a value of "0" (or no value as it is the default) would be a standard "Payment" transaction type. "1" would be a "Authorize Only" transaction which would later be captured. Values above this are combinations of those two with FraudGuard and 3D Secure.

Optional Parameters

These can be set in vsadmin/includes.php if you want to include them

$sp_primary_ref_name= "Order Number";
Defines the label on the hosted pages for the Primary Reference field.

$sp_card_types="VISA|MASTERCARD|AMEX|DINERS|JCB|PAYPAL";
Defines the card types accepted. This must be a subset of the card types you accept.

$sp_page_header_image="https://yourstoreurl.com/images/header.png";
URL of an image to be used as the header of the hosted pages.

$sp_page_footer_image="https://yourstoreurl.com/images/footer.png";
URL of an image to be used as the footer of the hosted pages.

$sp_page_title="Your Store Name";
Defines the title text on the hosted pages.

Accepting real payments

Once you have tested the shopping process thoroughly follow the steps below when you are ready to take real credit card payments.

  • Uncheck the Demo Mode option in the store admin.