Hi Jeremy,
This sounds great... is there an eta with this? I have SagePay and Iridium payment gateways that I would love to add those to it and also get the benifit of other payment gateways. Right now I have a large amount of pressure to add new payment gateways and have been looking over the Payments module again. I've renamed my Payment class to Transaction and after that the main things that seem to tie it to the the eCommerce is the format of the cart and the use of member. I've moved my system to create members for orders - but the cart part is the one I still haven't worked out how to do.
I'd be very interested in the *interface* you'd be planning on. for example...
To get a payment:
$arrParams = array(
'PaymentSystem' => 'PayPal',
'InternalOrderRef' => 'ABC123',
'Product Description' => 'html description' / array('LineItem'=>33,'AnotherLineItem'=>44),
'ReturnSuccessURL' => 'successurl',
'ReturnFailURL' => 'failurl',
'Currency' =>'GBP',
'Amount' => 77,
);
To make a refund:
$arrParams = array(
'PaymentSystem' => 'PayPal',
'InternalOrderRef' => 'ABC123',
'Amount' => 77,
);
then both will pass back upon success/failure with...
$arrRetun = array(
'Code' => $iReturnCode, //this is from a *generic* list that we can hold.
'Detail' => $arrFromSpecficPaymentGateway,
);
Basically this would allow the site to run on Paypal today and then switch to WorldPay tomorrow, but still handle refunds from Paypal... also switch from different currencies on the fly instead of being locked to the one in your config file.
Barry