digitickets / omnipay-barclays-epdq

Barclays ePDQ Essential payment gateway integration into the Omnipay library.
MIT License
10 stars 17 forks source link

Update documentation with a usage example #6

Closed GhaziTriki closed 9 years ago

GhaziTriki commented 9 years ago

The usage is not very clear and seems to be different from omnipay logic. Is it possible to add a little explanation how to use it? Barclay sample code is here http://www.barclaycard.co.uk/business/accepting-payments/website-payments/web-developer-resources#tabbox3

Can you also explain what the difference between their sample code and the library usage?

samvaughton commented 9 years ago

Hi @GhaziTriki , this was implemented a while back for an application that required ePDQ support. From what I remember it is inline with Omnipay logic as far as I'm aware.

I do recall that Barclays ePDQ documentation was very sparse, difficult and unhelpful. This library is still being used in production (I think) so should be working fine.

samvaughton commented 9 years ago

Also as a side note, I recommend you going with a different payment gateway provider such as Stripe or Braintree. These banks that provide gateways have very bad API's and interfaces.

GhaziTriki commented 9 years ago

Barclay and gave us acces to their gateway. We will add more gateways in the future to our application. The problem seems that redirect() method is not availalbe in $response->redirect() for this library. Can you please clarify this? (we have also forked the library to add more option like logo, title... and we will be providing pull requests as soon as possible).

samvaughton commented 9 years ago

@coatesap is very familiar with the Omnipay library and has worked on this, maybe he can provide some insight as I no longer work at the company this was built for.

And that would be great!

GhaziTriki commented 9 years ago

I found how to do it

$gateway = Omnipay::getFactory()->create('BarclaysEpdq\Essential');
$purchase = $gateway->purchase();
$purchase->setTransactionId('ORD001');
$purchase->setAmount(50);
$response = $purchase->send();
GhaziTriki commented 9 years ago

@coatesap can you please explain how the completPurchase works in this library?