Reputation: 2982
I have integrated PayPal express checkout into an online shop. After the customer has filled out the forms on the PayPal site and PayPal redirects her/him back to the shop I make the DoExpressCheckout call imediately. But at the PayPal forms the name of the button in the last step is "Proceed" (or something like that). Also there is a note that the buyer can finish his/her order in the next step.
I found a note here that it is possible to change the label of the button:
(Chapter "Buyer Pays on PayPal" at the end of the page).
I am using the PHP SOAP SDK (merchant-php-1.1.93_0.zip). How can I implement this feature with that SDK? There ist no parameter useraction
in \SetExpressCheckoutRequestDetailsType
. Also setting PaymentAction
to Sale
doesn't change anything.
Upvotes: 0
Views: 144
Reputation: 11649
useraction is not a parameter for an API call. It is a GET parameter passed when you send the customer to PayPal.
I downloaded the PHP SDK again just to ensure I had up to date info when answering your question.
Starting on line 82 in 'samples\ExpressCheckout\SetExpressCheckout.php':
if($setECResponse->Ack =='Success')
{
$token = $setECResponse->Token;
// Redirect to paypal.com here
$payPalURL = 'https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=' . $token;
Change '$payPalURL' to
$payPalURL = 'https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&useraction=commit&token=' . $token;
Also, the 'paymentaction' parameter decides whether your transaction is a sale or authorization. This should always be sale unless you have orders that you are unable to send out immediately (this only applies to physical goods, digital goods should always be 'sale')
Upvotes: 1