PayPal IPN in WooCommerce - wordpress

I am just wondering which table stored the PayPal IPN in WooCommerce. The dashboard in wordpress(woocommerce) can not see so much information in the PayPal IPN, only few of them like Payer first name,Payer last name,Payer PayPal address,Payment type,PayPal Transaction Fee. I want to see more about the IPN data such as if the paypal is verified, phone number, registered country, etc.

In your dashboard You will see:
Order #ORDER_NUMBER details
Payment via PayPal (`PayPal Transaction ID`).
In your PayPal account access Instant Payment Notification (IPN) details page. profile -> selling preferences -> Instant Payment Notification Preferences. Click IPN History page and search the transaction id that you see in WooCommerce. You will see all the information about this IPN. HTTP response code, Delivery status, the actual message sent by PayPal.
You can also access the transaction id from WooCommerce table.
select meta_value
from wp_postmeta
where post_id=ORDER_NUMBER and meta_key='_transaction_id'
replace ORDER_NUMBER with your WooCommerce order number.

Some might need the IPN data from PayPal to feed into other in-house operational processes, like shop floor order processing, etc., rather than having woocommerce consume all the IPN data and only 'keep' part of it for display. Better to either save it all, or offer a configuration option to specify a 2nd IPN listener the data could be piped to, in order to facilitate automation of other order processing systems.

Related

PayPal Instant Payment Notification for Held Payments

So I'm using an API to receive payment notifications,
I don't really care what's in the notification I just want paypal to notify the API when a payment has been made and execute my own code.
So first off is this even going to work?
I put the URL for the API in the Instant Payment Notification under my account settings. My account is still new because I sent a test payment and it didn't work, do held payments not notify the IPN?
If the payment is held within PayPal it will notify via IPN, yes. You will be able to see such held payments by logging into www.paypal.com and viewing the activity. There will also be a "pendingreason" value in the IPN, to notify you of why it is held.
Note that if at transaction time a "notify_url" is set by the integration (many older shopping carts do this), that URL will be used in place of whatever is set at the account level in www.paypal.com. Whatever was set at transaction time has precedence.
--
If an order is "on hold" by your shopping cart (pending payment), PayPal will not send any notification as nothing has taken place within its system (except maybe a checkout attempt that was clicked on but not finished for whatever reason)

WooCommerce or Stripe webhook for triggering shipping?

I’m selling ditigal goods and I am wondering how to trigger the delivery once the payment has been validated on my Store.
Option 1 : Get webhook from stripe
First option would be to create stripe webhooks and proceed to sending my products once payment has gone through.
But does Stripe have the info of what products have been bought by customer, apart from amount paid?
Option 2: Get webhook from Woocommerce
Second option is that Woocommerce get the info from stripe, then create a webhook there so that I sell the right goods since Woocommerce may have all the infos.
Any ideas of what webhook to create?
But does Stripe have the info of what products have been bought by customer, apart from amount paid?
Yes, it does. The checkout.session.completed event includes the Checkout Session object, which in turn includes (NB not by default) expandable line_items list.

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 IPN Notification

I need some help typing to figure out what im doing wrong.
My site is setup to manage orders using WooCommerce. the site is a public site, but my Perl Script needs to be implemented as im testing a few things out and displaying some messages. The public site is called 'publicwebsite.com'. But the other site im displaying all this information and proccess it is called 'mywebsite.com'
I have setup my API credentials and setup my IPN for paypal payment. To direct the IPN to my website i have gone into the 'My Selling Tools' on the sandbox side of Paypal, and set the IPN to http://mywebsite.com/test_pl.html
when i place and order, somehow the IPN is not being directed to the URL. I went to the IPN tabe again on the Paypal side, and clicked on history, and i see that the 'Notification URL' is still set to http://publicwebsite.com/WC_Gateway_Paypal, whereas it should have been http://mywebsite.com/test_pl.html.
I cannot seem to find the place where i can change the preferences such that Woocommerce pushes the information onto the site.
Please Help.
Thanks in advance
WooCommerce will set the IPN location of each transaction so that it can be notified when an item is paid for and continue its process.
Not knowing your data flow, I would suggest looking into woocommerce available hooks and hook into the IPN notification and then send the data (and user) to your perl script.
This way you satisfy WooCommerce's condition that it needs to know about payments, and you satisfy your need to have your perl script called so that it can do additional processing.
One possible solution is to update your IPN settings in your PayPal Account. If you have a standard PayPal account here are the instructions directly from PayPal Documentation:
Go to the PayPal website and log in to your account.
Click Profile at the top of the page.
Click My selling tools.
Click Update beside "Instant payment notifications" in the "Getting paid and managing risk" section.
Enter the notification URL and select "Receive IPN messages."
Click Save.
Just in case you need it below is the PayPal Instant Payment Notification Guide. It includes an IPN simulator.
PayPal Instant Payment Notification Integration Information

How do I fetch the Transaction ID from PayPal website to my web site?

I am using Paypal sandbox testing module in my Shopping cart site. I have test account in paypal sandbox. i am sending amount to paypal. After payment success when retun back to my web page I want to get transaction id and amount.Kindly help me.
You probably want to use Paypal IPN. You can get the Paypal transaction id, amount, and a slew of other information, using Paypal IPN. Basically, this is where Paypal will do an https post back to your site after a transaction, and send all of the info for the transaction. See https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/ for info.
You need to specify redirect url.You can have two urls one for success and other for failure.Thats how i implemented it in one of my project (Dont have it now with me for reference).
Take a look here or here.This link has an sample project.It may help.

Resources