I have a form where people can order one single item for a fixed amount of money. Here are the steps:
customer fills out the form
customer hits submit and proceeds to the review page where he can check his inputs
in the review form should be a button to pay with paypal (button with own design and text)
customer hits this button, proceeds to paypal, makes his payment
after he paid successfully or not he should be redirected to the form on my site where he can see the result of his payment
wehter his payment succeeded or not he can see a message generated by the form application out of the PayPal return string
I tried it but the only thing I can do is that after he submits the form he logs into PayPal, hits the "continue" button and is redirected to my site where he can review his order again and needs to hit "Pay" again to get his order processed.
So all I want is that the customer does all the inputs and reviews on my site and after that he hits a "Pay" button in my own style and proceeds to PayPal where he pays the order without getting back to my site until the payment is done. Then he should be redirected to my site and receives the appropriate message.
What kind of PayPal function do I need?
Hope this was clear enough. Please let me know if you need further information. Thank you all in advance.
Paypal Express Checkout is what you are looking for, it will solve your problem
Follow the sample and guide:
Link to Code Sample
Link to Paypal Doc
Related
I'm working on a website where the users can create listings like in a regular classifieds website.
My concern is that if a user wants to feature his listing on the website, he has to make a payment via Paypal (IPN). The problem is that when the user completes the payment, the paypal payment confirmation page will give the user 2 links at the bottom of the confirmation page. The first one is "return to your website" and the second one is "view your paypal account".
If the user clicks the first link it will trigger the featured option and make his listing featured. However if he clicks the second link the user will be sent to his paypal account and will not trigger the featured option.
My concern is that users who will click the second link will pay however will not get the service they paid for. This portion of the website was done by my developer and he said that it would only work if the user clicks the "return on your website" link.
Would you guys have any suggestions or help on how to resolve this? If Paypal did not show the second link it would resolve this pb.
That's what IPN is for. If you enable it, PayPal will send you a payment notification. You should enable the feature for the user when you get the money, regardless of what the user navigates to.
I hope to integrate Paypal using "Add payment buttons to your website" https://developer.paypal.com/webapps/developer/docs/integration/web/ since my site only needs one time purchase so this solution is perfect.
But it requires an IPN implemented as an async solution at the merchant side to receive the transaction result. While the button redirects user to paypal.com to finish the payment process. But after that is done. User is not automatically redirected back to merchant site.
I found on the forum that I can add an "data-return" attribute in the script element so when user is done paying there is an additional link that points to the merchant site. Now since IPN is asynchronous, once user views the "data-return" page, IPN may not have been called yet. My questions are:
1. So what's the suggested solution of synchronizing between return page and IPN?
2. When testing, I found a lot of query strings are appended to the "data-return" URL, looks related to transaction result. Can I use them to replace IPN so I have a SYNCHRONOUS way of verifying the transaction result?
Thanks!
Use Payment Data Transfer (PDT, for short). https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/paymentdatatransfer/
I run a small marketplace with multiple sellers where buyers can buy items and pay with PayPal. The problem is, when someone makes a payment, they are then displayed the "Payment Confirmation" on the PayPal website and are given a choice to either return to their PayPal account, or return to the website.
Is there any way to keep the payment flow on my website, except for the payment part? I notice when buying on Etsy for example, the buyer goes to PayPal to make the payment and is then immediately returned to Etsy for the payment confirmation. They never see the PayPal payment confirmation page.
I assume it could be because Etsy and PayPal have a special arrangement that isn't available to other sites? Or am I missing something in the API?
Right now, with the normal PayPal API, this is what buyers see:
NAME, you've just completed your payment.
Your transaction ID for this payment is: XXXXXXXXXXXXXXXXXXXX.
We'll send a confirmation email to your#email.com
Go to PayPal account overview.
Go back to "seller#email.com".
I can't even figure out how to change the "Go back to..." link to my website name in the hidden fields. PayPal just chooses to display the seller's (the person that received the payment) email address.
Is there any way to at least set a website name for them to return to with hidden variables? Keep in mind that I have different sellers, so it's not something I could set inside each seller's PayPal account.
Thank you :)
I assume you are using Express Checkout with Set/Get/Do EC API integration. Please check the below document for experience options available with Express Checkout API.
https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECCustomizing/
The 'useraction=commit' in the PayPal payment auth url triigers the 'Buy' button. If you do not send that request paramter then it will show 'continue' button and you can complete rest of the process on your site.
However, if you are using Paypal Payment Standard product then you need to use Express Checkout to accomplish the outcome you are seeking.
Please some one explain what happens if we send useraction=commit in paypal site url.
> And what parameters we need to send to paypal in SetExpress checkout request to make visible purchase value at PayPal site page.
With Express Checkout, you can shorten your checkout flow to let buyers complete their
purchases on PayPal. Then, you can skip your order confirmation page.
Generally, buyers select payment methods as the last step before they complete their
purchases. If you collect no additional information after buyers return from PayPal, you can
skip the confirm-order page on your website. If you collect additional information that does
not affect the payment, PayPal recommends that you collect it after buyers complete their
purchases.
The useraction URL parameter in your redirect to PayPal determines whether buyers
complete their purchases on PayPal or on your website. If you set useraction to commit,
PayPal sets the button text to Pay Now on the PayPal Review your informaton page. This
text lets buyers know that they complete their purchases if they click the button.
As for your other question about what parameters you need to send to PayPal in SetExpressCheckout request to make visible purchase value at PayPal site page, I am not sure I completely understand what you are asking. If you pass over the amount, this will show up on the checkout page. If you are wanting items to show up on these pages, you would need to pass over the line item details. These variables can be found in the Express Checkout Developers Guide, they will be slightly different depending on if you are using SOAP or NVP.
NVP Developers Guide
SOAP Developers Guide
After adding stuff in shopping cart, clicking some Pay Now with PayPal button, and successful PayPal payment (PP or CC), it is logically possible that a user stays on PayPal website, if for example the Auto Return option isn't activated (or it is but it doesn't work because the user is a guest user without PP account)
The user can return to the site by clicking a link, but doesn't have to. My question is: if he doesn't, how will the site owner be aware that the user paid so that he can now send the items by post? That the site owner gets informed of being paid seems elemental to me, so I find incomprehensible that such elemental thing be left to some obscure Auto-Return option.
Please can somebody explain this to me?
This is a common challenge with any redirected payment gateway, and it's the reason most (if not all) of them implement some sort of asynchronous notification that a payment has been completed. In PayPal, this is the Instant Payment Notification (IPN). You must setup on your site either a generic IPN listener that you link to from your PayPal account profile settings or you can create a more targeted IPN listener specifically for your transactions and use the NOTIFYURL (or related) parameter in the form or API request you use to redirect to PayPal to send IPNs to that listener.
In my integrations, I never perform any order update or transaction logging when the customer returns from the site, preferring instead to wait for the IPN that I can validate and ensure came from PayPal as opposed to a spoofed return from someone trying to hack my checkout process.
For more information, see the IPN documentation: https://www.x.com/developers/paypal/documentation-tools/ipn/integration-guide/IPNIntro
Paypal provide IPN for this purpose through which we paypal send request asynchronous to your site and you can perform whichever action you want
I think the point may have been missed here. Or a problem does exist. If the purchaser uses CC, even if you have IPN set up and it works, but if the purchaser uses CC and does not click a button on the last page, which is not presented when using PP account, it is possible for the funds to go through, but no IPN, and so your website is unaware of the purchase. This last page, is an extra page that CC user gets after the page with the Pay button on it.
In this state, you can even go into IPN history, and the IPN is there, says it is sent, but it hasn't been. It does not get sent until after the purchaser clicks the button on the extra page and then they are taken to the auto return page.