Get paypal user information after sale creation -
I am integrating PayPal in a shopping cart and want to get the user's shipping information after paying. I know that there was a way to use this old API, but it seems that the API has changed when the developer was started. Paypal.com. I do not know which URL I have to use to get information about extended donors.
So far, I am sending the user to paypal and when the user comes back, I have a payer ID and a token. From the previous call, I have an execution link, but there is no details link. Do I need to force the user to enter shipping information before reaching PayPal? If that's the case, it just seems confusing that PayPal shows shipping information from my system and not mine.
How can I get once from paying the shipping amount to the payer of the payment? Most traders use paypal instant payment notifications (ipn) to get payment details, including shipping address. Are there. It allows you to receive real-time information instead of pinging us instead of paying. Below is a simple PHP script that will take the IPN and validate it to ensure that it was not a fraud attempt. Once confirmed, you can update your database, send an email, or know about payment once. Forex currency ($ key = $ {$ value} as $ _POST) {$ value = urlencode (stripsash ($ value)); $ Req. = "& Amp;" . $ Key "=" $ value; } $ Curl_result = $ curl_err = ''; $ Ch = curl_init (); Curl_setopt ($ CH, CURLOPT_URL, 'www.paypal.com'); // Change the URL to sandbox.paypal.com if our developer environment tests in curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ CH, CURLOPT_POST, 1); Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ req); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, array ("content-type: application / x-www-form-urlcode", "content-length:". Strlen ($ req)); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_setopt ($ CH, CURLOPT_VERBOSE, 1); Curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, true); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 30); $ Curl_result = @curl_exec ($ ch); $ Curl_err = curl_error ($ ch); Curl_close ($ ch); // Set the Validation flag if (strip ($ curl_result, "verified")! == incorrect) $ valid = true; And $ valid = false;
This method is more reliable than payment data transfer (PDT) because it does not rely on returning to your site to pay on the consumer.
Comments
Post a Comment