WooCommerce order status not getting assigned properly for PayPal payment - wordpress

Scenario
I'm using paypal sandbox account for payment right now and I've set it up correctly , the order is getting successfully placed if I use paypal payment while checkout. But the status should be completed but its not assigning that.(I'm trying this with virtual product only)
I've already read several articles related to same issue and I only found that if it is set properly then the status should be completed or either I've to set it manually by using code(but is this only way? and is it proper?).
Following are the observations from admin side:
On Order Notes -
Payment pending (unilateral). Order status changed from Pending payment to On Hold.
Paypal log(only last 3 lines as it was huge) -
2019-03-08T11:40:45+00:00 INFO Received valid response from PayPal
2019-03-08T11:40:45+00:00 INFO Found order #9985
2019-03-08T11:40:45+00:00 INFO Payment status: pending

The typical cause of this is a mismatch between your paypal details.
When you signed up for Sandbox Paypal you we're given a sandbox email address. You must make sure you're using your Sandbox email and not your standard Paypal email address.
You can also try looking in
Woocommerce > Settings > Products > Downloadable Products
And make sure you have the grant access after payment box ticked.
http://cld.wthms.co/ZExhMq

In my case, it was happening because I had created both facilitator and the buyers account separately via https://sandbox.paypal.com in contrast both of these accounts should be created in https://developer.paypal.com > sandbox > accounts.
When I had created the account separately the email address was not getting verified, I think that could be the reason for it not to work also when the user accounts are created from (https://developer.paypal.com > sandbox > accounts) you can see notifications for each account and perform an action accordingly.

Related

WooCommerce Paypal - Disallow Payment based on PayPal Billing Address (Country Restriction)

A client of mine has some legal provisions that only allow him to offer PayPal as a payment method if the buyer's billing address is located in a specific country.
Naturally you can disable payment methods based on the billing address the buyer provides via WooCommerce. However, that is quite easy to manipulate.
PayPal asked them to implement a query, AFTER the buyer chose PayPal, signed into his account and accepted the payment method, to check if the billing address the buyer provided in his actual PayPal account is also located in that specific country. If so, the buyer proceeds to the 3rd checkout step and can finish his order. IF NOT, the buyer will be redirected to the 2nd checkout step, sees a note "This payment method is not available for your country" or whatever and can choose another payment method. So basically, the query has to check if the billing address is in a specific country and then decline the "payment execute" command.
I'm using the standard PayPal gateway that comes with WooCommerce. Does anyone have any idea how to make this work?
PS: Yes, retrieving the billing address from PayPal is usually not possible. However, my client got a special permit from PayPal to do so. So that's not an issue.
Using the PayPal Checkout plugin for WooCommerce, validate whether the response of the METHOD=GetExpressCheckoutDetails API call to PayPal contains the country you want, and use this to decide whether to let the customer proceed or not.

WooCommerce Email on Payment Done but not received to Admin

I would like to know which WooCommerce email is sent to the admin when user has done the payment, money left from the user (bank) account, but admin haven't received the amount. Is there an email trigger for this situation by default ?
The new order email to the admin looks for the order status to switch to Processing (it also looks at other states, but Processing is the one relevant to your question). The payment gateway will decide what makes an order "paid" (and thus Processing in WooCommerce), so the answer to your question may vary with different providers.

Standard PayPal Sandbox Error Issue in Woocommerce

I have configured WooCommerce in WordPress and enabled PayPal Standard Sandbox with a client PayPal account email Id.
When I purchase 3 downloadable products for a Total amount of USD 3.25 with PayPal Standard payment gateway, I got this error:
"Things don't appear to be working at the moment. Please try again later."…
I checked PayPal settings, it is attached with bank and credit card.
Remember: As can check its not business account nor I filled "API credentials".
WooCommerce Paypal Settings screenshot:
What I am doing wrong?
If you enable Paypal Sandbox option, you need to get a testing developer account (as specified in related settings… see below):
This testing account doesn't need to be attached with bank and credit card.
That's why it doesn't work…
The developer account provide (for testing):
Admins account (where you will get transactions, notifications, errors)
Fake customers account for fake purchases.
Once registered your developer account, you will need to create a pair of admin + customers account for one URL shop.

PayPal Sandbox - Invalid Billing Address

I'm trying to test a purchase on a website I'm developing which uses WooCommerce. So, when I proceed to checkout and chose to pay without a PayPal account (this payment method still runs through PayPal's system) and use a credit card. I'm using a fake credit card that I generated in PayPal sandbox. When I type in all the correct details and attempt to continue with the payment, it returns an error that the billing address I used is invalid (the billing address I'm using is the address that PayPal Sandbox generated for me. I'm not sure how to fix this.
Kindly contact PayPal Merchant Technical Services for further assistance on this issue.
https://www.paypal-techsupport.com/app/ask

Paypal sandbox. Unable to confirming bank account on test accounts and buy subscription

I have created several preconfigured buyers test accounts over the week. Not a single one of the generated bank acount is confirmed. I have gone through the steps on the documentation to no avail. On some of them it errors on the continue button under complete bank setup. It has a Deposit not sent on the Bank Account details above the button. Is says Sorry, an error occurred after you clicked the last link ... We are sorry, we are experiencing temporary difficulties. Please try again later. If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment. I have cleared cookies and all cant move forward. On others I get to do the full submission and get to the end with a congratulations u have confirmed your account. However on the test account site it shows unconfirmed.
Also I cannot purchase a subscription at all with any of the accounts. It says cannot use this card please choose another source of funding.
Thanks for your help
I just tested this set-up. If you create a preconfigured personal buyer account from developer.paypal.com, the bank account should already be confirmed and verified. When you create a preconfigured account make sure to select "Buyer (use to represent your customer's experience)" and not "Buyer In-store (Use to represent your customer's experience with in-store checkout)". The In-store checkout does not give you a confirmed bank account.
When you create a In-store checkout Buyer Account, you will see the following error: Account Created Successfully but failed to add Credit Card and Bank.
To test a merchant transaction, you must use a test Business Account
To test a buyer transaction, you must use a Personal Account

Resources