WooCommerce Email on Payment Done but not received to Admin - wordpress

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.

Related

WooCommerce - Send new order emails at different order status

I have an issue that WooCommerce sends out the “New Order” / “Order Confirmation” email as soon as an order is placed.
When working with a payment provider like stripe or paypal, this leads to issues since people have the option to cancel within the payment process (for example at paypal with “Cancel and go back to store X”).
This works fine so far, the order gets set to “canceled” and nothing more happens.
But the Order Confirmation email gets still send, even though the user is not even done with the payment itself or cancels it.
Is there any solution how to send this email only at a different status – for example “Processing” or “Completed”?
I tried using Send WooCommerce New Order email notification only for paid orders with processing status answer code, but it didn't worked for me.

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 order status not getting assigned properly for PayPal payment

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.

Prevent an order from being created if credit card is declined?

When a user places an order on my woocommerce site, an order will be created in the back end with a pending status even if the user's credit card is declined.
I want to be able to prevent the order from being created until a successful response is recieved. I am using Authorize.net as my payment gateway.
You can use the woocommerce_order_status_failed hook to handle this use case.

PayPal Failure notification

I have an asp.net application
The User can purchase items and/or upgrade an existing service. I use PayPal to handle payments.
When the order is placed I put the order details into a table as a record. I also do this so that if the User revisits my page I check a flag in that table to tell them whether payment has been received.
If not received then I display a message on my web page telling them they have requested and upgrade and that we are currently waiting for payment.
I also disable any future purchases for that User so that they do not upgrade twice (or more).
Now, it occurs to me that when the User is redirected to PayPal to make that purchase that a payment could fail or they could close the web page.
In that case then the User would not be able to ever upgrade unless they send me a support email.
What is best practice? Wait for a time period to elapse and if no payment then allow User to try again or stick with the support email route?
If it is best to wait for a period of time what is an acceptable period of time to wait for?
I am using the post back of Form values method to imitate payment to PayPal:
https://www.paypal.com/cgi-bin/webscr
What you can do.
Each time the user is ready to leave your page and move to paypal to pay, you create
Clone of their order
A new unique ID connected with that cloned order.
So, if one order if fail, at any time the user come back is find a new set "Order"+"Unique ID". With that 2 elements can make a final payment.
You may end up with two or tree or more cloned orders, but from my experience because this is what I really do, is rare, and its safe for your customer and you.
Also please note that paypal is accept only one unique id for each order. If one ID is fail, then you must create a new one anyway.
The unique id you send to paypal go to the invoice parametre.
The manual for all parametres is this pdf - PayPal Payments Standard Intergration Guide... and there are more pdf for paypal...

Resources