Is it possible to execute a payment and give a new invoice number after a confirmation page? So that the workflow would look like this:
Create a payment and redirect the user to paypal's approval link (with intent = sale).
The user is redirected back to my shop and sees a confirmation page.
After clicking on a confirmation button I execute the previously created payment.
In step 3 I want to add the final invoice number, but I couldn't find an option for this. Or is this workflow not possible?
This was a bug at the PayPal sandbox, now everything works. If you want to update a payment before it's executed you can use \PayPal\Api\Patch and \PayPal\Api\PatchRequest.
Related
I'm implementing the v2 Express Checkout Paypal Integration; It works fine, however it does not fully complete the transaction (business account does not receive the payment).
I'm running tests on sandbox.
The token is generated as well as the Order ID.
I copy and paste the given link into the URL bar and press enter to proceed to complete the transaction. https://www.sandbox.paypal.com/checkoutnow?token=2463323E24235WQ.
The transaction is completed and redirects to a new URL https://example.com/return?token=2463323E24235WQ&PayerID=UEJ2NE9233DS5W.
Everything seems to work well, however when I come to check the notifications of the sandbox business account (in which the payments were supposed to go to), it does not show any payment.
Everything seems to be set accordingly but the payments just don't go to my account.
transaction is completed
Nope, wrong; the buyer approved the payment. There is no transaction.
To create a transaction, when the buyer returns to e.g. https://example.com/return?token=2463323E24235WQ&PayerID=UEJ2NE9233DS5W , you must display an order review page and capture the order with the appropriate API call.
If you want to capture the order immediately (skipping the display of an order review page), you can specify this in the initial order setup so that the "Continue" button the buyer clicks to return to your site instead says "Pay Now".
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 am using the PayPal Adaptive Payments API in a simple (not chained or parallel) flow: payment is created, payKey is generated, user is redirected to payment approval URL in PayPal. Once approved, PayPal redirects the user back to my app.
The specific API call I am using is documented here - the _ap-payment command. So the URL looks like https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=value.
I have noticed that sometimes the PayPal page the user is directed to defaults to the login view, whereas other times it defaults to the credit card info view (for submitting a CC payment via PayPal w/out logging in to a PayPal acct).
For user experience, I would like to ensure the user always sees the PayPal login view.
Anybody know if there's a way to enforce that?
(or if there's something in how I'm calling the API that triggers one view or the other that I haven't noticed yet)
thanks!
There is a variable in Express Checkout called "LANDINGPAGE" which determines which payment option is the default one shown to the customer.
The two appropiate values for this variable are :
Billing - Pay via debit/credit card
Login - Pay via PayPal account
This is the only API-based variable which would allow you to customize checkout page to decide which landing page was shown to the customer first.
You can have a try.
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
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/