useraction parameter in URL - paypal

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

Related

Can paypal credit card payment be handled in a hosted page like paypal express?

For paypal express payment (the one pay via a paypal account), I am quite happy to provide a return url and handle the payment in a paypal page. (so the transaction doesn't happen in my site).
If I want to accept credit card payments, I saw some APIs that I can pass credit card number from my site to paypal. Is it possible that I can just provide a return url and go to a paypal page? On that page, my user can type in credit card number and payment details. So I won't have to worry if my site is secure with those financial data.
Many Thanks
Just add the following parameters to your SetExpressCheckout request and I think you'll get what you're wanting.
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
USERSELECTEDFUNDINGSOURCE=CreditCard
Also, make sure you have the VERSION set to 119.0.

Paypal: technique to obtain buyer's country for establishing postage prices without introducing extra steps

This is probably a stupid question, I think I'm having a mental block.
I want to use Paypal's express checkout for buyers to make purchases with as few steps as possible (also using Paypal's optional account feature). The problem is: for me to direct the user to paypal, I will need to have calculated shipping costs, which depends on the country they're in. Obviously I cannot know this unless I have been told one way or another. What are common solutions to this problem?
Ideas:
Use their IP address. Not reliable - various types of proxies, VPNs, anonymizers etc.
Have the user select their country from a drop-down box before I redirect them to paypal
Force them to log in using Paypal's Identity service before calculating postage
Use 1. or 2. and once payment is received, if country is different to expected,
Refund buyer the difference in postage cost or request an additional payment. (Hardly ideal)
Similar to 4., instead of "Sale Payment Action for Express Checkout" Use 1. or 2. in conjunction with one of Paypal's delayed express checkout payment methods and if necessary reduce or increase the amount charged:
Authorization Payment Action for Express Checkout
Order Payment Action for Express Checkout
I'd like to know what solutions other developers have chosen - maybe I've missed an idea. As a consumer, I cannot remember seeing solutions to this.
The general way people do this is simply to use GetExpressCheckoutDetails to obtain the buyer's shipping address, apply any shipping/tax as necessary, and display a final review page on your site that the user would confirm before calling DoExpressCheckoutPayment.
If you want to eliminate the additional review page (PayPal's and then your own) you can use the Instant Update API.
In this case you would include an additional parameter on the URL when you redirect to PayPal (useraction=commit) and this will change the button on the PayPal review page to say Pay instead of Continue.
Also in your SEC request you'll include the CALLBACK parameter and include a URL to your callback listener. PayPal's review page will POST the buyer's shipping address to this callback URL so that you can receive the data, calculate shipping and tax accordingly, and send a response of those options back to the PayPal review page. This will populate the PayPal review page's drop down menu for the shipping option and the user can choose accordingly.
This method allows you to utilize the PayPal review page entirely and finalize the payment there so that the only thing the user sees once they're returned to your site (after you call DECP) is a final thank you / receipt page.

PayPal API - How to keep the payment process on my website?

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.

Are users auto redirected to success url in paypal?

There is a success url option when you create the buy now button. But also there is this option on Website Payment Preferences. What I wonder is, are users auto redirected to success url or return url ?
When creating the buttons, the success url that you set in the button code will override the return URL that you set in the account. Also keep in mind that buyers only making a payment with a PayPal account will be automatically returned to your site. Buyers that make the payment using a credit card, will have to click a link/button once they have made the payment on the PayPal page to return to your site. This is done so that they can either print a copy of the receipt from that page, write the info down or etc before they are returned to your site. Unlike buyers that use PayPal accounts to make the payment, these buyers that use credit cards can not always get back to these details. Some one that pays with their PayPal account can simply log into their account and view these details at any time.

Paypal express-checkout with option useraction=commit not creating transaction

I have integrated paypal express-checkout in a website. All seems to work fine. When customer is redirected to paypal for payment, the button Pay Now appears, since I am using:useraction=commit, i.e.:
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=MYTOKEN&useraction=commit
Customer logs in from Paypal and clicks on the Pay Now button. Paypal gives no error, everything seems to be successful and customer is redirected at the RETURNURL, but no transaction is created in the buyer or in the seller account.
I'm afraid I missed some points from Paypal API documentation.useraction=commit will NOT complete the transaction. After returning from Paypal, we still need to execute DoExpressCheckoutPayment in order to complete the transaction.
Like George said, useraction=commit does not complete the transaction. It only changes the PayPal UI so the customer feels they have confirmed it there, so you don't have to add confirmation UI on your site. You still need to make the request behind the scenes to confirm it.
PayPal's docs say this:
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.
After PayPal redirects buyers to your site, call
GetExpressCheckoutDetails and DoExpressCheckoutPayment to have PayPal
complete the payment successfully. Call DoExpressCheckoutPayment
without waiting for buyer interaction. Use information in the
GetExpressCheckoutDetails response to fill out your order confirmation
page.