1

Hi I need help with omnipay bundle and symfony 2. I am integrating paypal payment on my symfony 2 project , and I do redirection on paypal do PAY there and paypal redirect me on my redirectUrl, with token and payerId.

But when I look in my sandbox account there is no transactions,

I am missing something probably, can anybody help?

1 Answers1

2

You need to call completePurchase() (or completeAuthorize()) once the customer is redirected back to your site to complete the transaction. Pass it the same options you gave when you first called purchase():

$response = $gateway->completePurchase($options)->send();
Adrian Macneil
  • 13,017
  • 5
  • 57
  • 70
  • 1
    Hi Adrian, Your library is rock...Is there anyway I can use your OmniPay Library for PayPal Adaptive payment? if no, Please add PayPal Adaptive payment functionality to the library. This will help many developers who only wants to use OmniPay. thanks for your great work!. – Anam Sep 06 '13 at 12:09
  • @Anam it's not supported yet, but will keep it in mind. thanks for the kind words! – Adrian Macneil Sep 06 '13 at 21:54
  • How does one connect the returned PayerID and token in the URL to the post back to Paypal? Or is this automatically handled? I am asking because I have some errors, and wondered if this data is not being sent back to Paypal, cant find any documentation on passing PayerID and token back. Thanks. – Laurence Cope Nov 22 '13 at 15:31
  • It's automatically included. If you're using Symfony though, you might want to check out this thread: https://github.com/omnipay/omnipay/issues/156 – Adrian Macneil Nov 22 '13 at 22:40
  • I figured it out, the token is returned on the first post to Paypal, so I store that in the database. When a user is returned from making a payment, I check the token in the URL with my database, then I can make the call back to Paypal again to confirm purchase. – Laurence Cope Nov 29 '13 at 12:18
  • Yes normally it is best to store all the details of your transaction in the database and pass them again when you call completePurchase(). That way omnipay can confirm the amount etc is correct. – Adrian Macneil Dec 02 '13 at 21:34
  • Has there been any movement on adding Adaptive payment for PayPal? – Staysee Nov 04 '15 at 15:42