Kartris User Guide

17.17. SagePay VSP Form

SagePay (formerly called 'Protx') is one of the most popular credit card payment providers in the UK.

VSP Form is a remote-type payment system, where customers are sent to a secure page on SagePay's servers to conduct the card transaction.

The system is simple to set up, but is unusual compared to most remote type payment systems in that the 'callback' (relaying information on a successful payment back to the store) is achieved by redirecting the user's browser back to the store. Most payment systems make the callback themselves (their server calls the store's callback page directly), even if they subsequently send the user back to the store after payment. In theory, payments might not be notified back to your store if a user closes their browser immediately after the payment was made, but in practice, we rarely see this and the system seems stable and reliable.

17.17.1. Setup within Kartris

  1. Go to Configuration > Payment and Shipping Gateways and click to edit SagePay VSP Form.
  2. For the 'friendly name', enter the name you want this payment system to be referred to on the front of your site where customers select it, for example 'Pay by credit card with SagePay'.
  3. Change the status from 'OFF' to 'ON' (for live orders) or 'TEST' or 'FAKE' for testing. 'TEST' means that a test order will be passed, allowing you to test the full integration and pass multiple orders and no cost without needed to do refunds. 'FAKE' means that Kartris will skip the SagePay payment process and instead format a post back itself to the callback page of Kartris. This is useful for testing that the callback process works, triggers the appropriate emails and so on without keep having to keep going through the SagePay test payment process.
  4. ProcessCurrency - if your store supports some currencies that your SagePay account cannot process, you should set this with a three-letter ISO code to convert all orders to this currency prior to sending users to the payment pages.
  5. Test URL - (for test orders) should be:
    https://test.sagepay.com/Simulator/VSPFormGateway.asp
  6. Post URL - (for live orders) should be:
    https://live.sagepay.com/gateway/service/vspform-register.vsp
  7. VSPProtocol - SagePay uses a versioning system so that when a newer version of their system is introduced, you can continue to process orders with the older version (at least for some period). The Kartris SagePay support is designed for 'Protocol 2.23', so you should not change this number unless your Kartris payment system is upgraded at some point in the future.
  8. The other various SagePay settings required should be supplied to you by SagePay.

17.17.2. Setup within SagePay

All the required information to process an order and direct the callback back to your store is actually posted through to SagePay with the order, so no further setup is required at their end. However, you should ensure with SagePay's support that your account is live before you start processing orders.

17.17.3. Common issues

17.17.3.1. The VendorTxCode has been used before

Orders passed through your SagePay account must have unique IDs. If you experience this error when trying to checkout, it means the order ID that is being passed has been used before on your account. This can happen if you've switched to Kartris from another store system, so IDs are starting from a low level. It can also happen if you restored a older backup of your Kartris database for some reason.

The simple way to fix this is to set your database so that order numbers are allocated from a much higher based (above the range of any order numbers you might previously have run through the account). In SQL Management Studio, open up the tblKartrisOrders table in design view and view the properties of the O_ID field. There is a section for 'identity'. Within this, there is a seed value, which at default will be 1. Change this to a number in the tens of thousands, or hundreds of thousands, save the table changes. From now on, orders should be allocated much higher ID numbers, and these will be passed to SagePay as order IDs.
 
powered by tomehost