Hi there, not sure if this will be of use to anyone, but I've developed a basic payment module that will allow you to use Sage Pay (ex. Protx) as your payment processor.
The only other option that I came across prior to writing my own was the Protx Direct Virtuemart Component from Ecom Solution (
http://tr.im/lPHg). Not sure that its working fully with J v1.5.10 or VM 1.1.3 so I built this basic module instead which I know does. Its live at
http://www.tikidrums.com.
I've not packaged it as a module rather attaching the files and describing what I did. I've not implemented 3D authorisation or the included PayPal transaction types, although should you need them it would be quite easy to shoehorn in the necessary code. All I was interested in was basic card payments.
I started with the Direct Integration kit from Sage Pay (
http://www.sagepay.com/developers/downloads/integration_kits/direct/PHP_Kit.zip). This is a standalone package that will create DB tables and allow you to process transactions in a stand alone environment. I grabbed various useful functions and pieces of code and placed it within this VM payment module.
Most payment processors allow you to provide a 'return url' that they will then post authorisation results back to. Sage Pay is different as far as I can tell and requires you to post and have the posting script gather the immediate results. Most of the VM modules seem to like the former process and have a notification script waiting for that return url to be called and from there determine if the transaction has been authorised or not. I've not used a notify script rather adjusted /administrator/components/com_virtuemart/html/checkout.sagepay_result.php to do the donkey work and update our orders table.
To get it all working...
- upload "ps_sagepay.cfg.php" to /administrator/components/com_virtuemart/classes/payment/
- upload "ps_sagepay.php" to /administrator/components/com_virtuemart/classes/payment/
- upload "checkout.sagepay_result.php" to /administrator/components/com_virtuemart/html/
- In VM Administration / Store create a new payment method. Call it what ever you want to show on screen when a customer chooses it. Give it a code of 'SAGE' and choose 'ps_sagepay' from the drop down list of "Payment class name". For "Payment method type" choose 'HTML-Form based (e.g. PayPal)'.
- Save it and then come back into it. In the Configuration tab add in your Vendor Name (provided by Sage Pay) and copy in the HTML included in the file `VM-SagePay-Form.php`
I think I've outlined all the steps, If I haven't, let me know and I can amend this list for all.
*Note: the JS form validation is not yet working at time of writing this. Anyone find where the problem with that is I'd appreciate the tip![attachment cleanup by admin]