e107inc / vstore

Simple shopping cart system for e107 v2.x Bootstrap CMS
GNU General Public License v3.0
17 stars 12 forks source link

PayPal Express API now only sets transaction as 'Pending' on PayPal #36

Closed martyshep closed 6 years ago

martyshep commented 7 years ago

Previously vstore would complete transaction via PayPal Express (aka API that has API Username, API Password and API Signature)

Now with latest vstore, when I use PayPal Express API the transaction does not go to completed status on PayPal, it does show on vstore sales as Completed, but on PayPal it shows as Pending and has to be 'Accepted' using PayPal dashboard to move to 'Completed'

CaMer0n commented 6 years ago

Thanks @martyshep . @lonalore Any idea?

CaMer0n commented 6 years ago

@martyshep I'm not experienced enough with OmniPay to know where to start with fixing this issue. However, I am willing to pay an expert out of my own pocket to look into it. What do you think @lukeholder @davidkoberan @delatbabel ? Would any of you consider looking at the code? (for a reasonable price) Thanks.

lukeholder commented 6 years ago

Now with latest vstore, when I use PayPal Express API the transaction does not go to completed status on PayPal, it does show on vstore sales as Completed, but on PayPal it shows as Pending and has to be 'Accepted' using PayPal dashboard to move to 'Completed'

Is this the case in the paypal sandbox?

Sounds like this could possibly be a setting (not to auto-capture) within the paypal dashboard maybe?

CaMer0n commented 6 years ago

Thank you @lukeholder ! @martyshep do you see an auto-capture option on Paypal?

martyshep commented 6 years ago

I am not sure if there is an auto capture setting on PayPal dashboard as another member of our club is the treasurer, I will ask him. When I revert to previous vstore commit PayPal goes back to working ok, so this suggests it's not PayPal?

lukeholder commented 6 years ago

@martyshep what is a vstore?

martyshep commented 6 years ago

vstore is the name of this plugin. I mean when I revert to a previous version of this plugin the same PayPal account integration works just fine. When I run this version, transactions do not complete properly, they need to be 'accepted' on the PayPal site to complete the transaction.

lukeholder commented 6 years ago

Oh sorry thought I was being asked about the omnipay-paypal package. I don’t support vstore sorry - you would need to ask them. If it’s a omnipay-PayPal issue please report on that repo.

martyshep commented 6 years ago

@lukeholder Ah I see :) The vstore plugin for e107 CMS uses omnipay-paypal package. I will let the developers confirm more about that.

lonalore commented 6 years ago

@CaMer0n I have no idea. Paypal Express API works properly with my sandbox account.

Status is "complete": kepernyokep_2017-09-25_17-54-31

Unfortunately I don't have live account.

CaMer0n commented 6 years ago

Thank you @lonalore !! 👍

martyshep commented 6 years ago

vstore plugin shows complete but the live PayPal shows processing and the payment has to be accepted, that's part of the problem. From vstore it looks like it worked successfully.

lukeholder commented 6 years ago

looks like you are hitting this issue: https://github.com/thephpleague/omnipay-paypal/issues/60

martyshep commented 6 years ago

Ah yes exactly that issue thanks @lukeholder We could adjust our workflow to compensate for this so the treasurer of our club then accepts the payment but the thing is there is no notification email from PayPal to say a transaction is in a pending status. Normally when a transaction is complete, PayPal send an email to the address associated with the account to say a payment has been successfully received and this is the cue to our treasurer performing an action. However when the transaction goes to pending, we don't get an email from PayPal to say so, so or treasurer doesn't know to go do his thing (our transactions are sporadic so not every day). Another option is for vstore to have notification email from e107 so when a transaction is made and goes to complete on the website, it then send notification email so treasurer knows to login to PayPal and accept the pending transaction.

SimSync commented 6 years ago

Implemented a fix in my fork. I'm pretty sure that this also works for others. Will be included in my next PR.