Warenkorb in Paypal Express anzeigen

techie

Grünschnabel
Hallo,
ich habe ein kleines Problem mit der Anzeige der Warenkorbdetails im Prozess ExpressCheckout.
Ziel soll sein, dass die Produkte aus dem Warenkorb bei Paypal angezeigt werden. Nach einiger Recherche bin eigetlich auf die Lösung gestoßen. Leider funktioniert es bei trotzdem nicht. Also muss irgendwo ein kleiner Fekler sein. Vielleicht kann ja mal jemand drüber schauen.
Bei Klick auf de Express-Button starte ich die Methode "SetExpressCheckout" mit foldenen Parameter an den API-Endpoint:
'https://api-3t.sandbox.paypal.com/nvp' per curl um den TOKEN zu erhalten. Dann geht es mit dem TOKEN per Redirect an:
'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='.urlencode($response['TOKEN'])


PHP:
              $url=('http://www.platzhalter.de');
   		$paymentType = 'Sale';
   		$paymentAmount = 714.00;
   		$returnURL =urlencode($url.'/cart/setcheckoutpaypalverify');
   		$cancelURL =urlencode($url.'/cart' );
   		
   		$nvpstr = "&Amt=".urlencode($paymentAmount);
   		$nvpstr .= "&CURRENCYCODE=".CURRENCY;
   		$nvpstr .= "&ReturnUrl=".$returnURL;
   		$nvpstr .= "&CANCELURL=".$cancelURL;
   		$nvpstr .= "&PAYMENTACTION=".urlencode($paymentType);
   		 
   		//Einzelne Produkte
   		$nvpstr .= "&PAYMENTREQUEST_0_PAYMENTACTION=Sale";
   		$nvpstr .= "&L_PAYMENTREQUEST_0_NAME0=".urlencode('Produktname zum Test');
   		$nvpstr .= "&L_PAYMENTREQUEST_0_NUMBER0=".urlencode('6235566');
   		$nvpstr .= "&L_PAYMENTREQUEST_0_DESC0=".urlencode('Size: 3XL');
   		$nvpstr .= "&L_PAYMENTREQUEST_0_AMT0=".urlencode('600.00');
   		$nvpstr .= "&L_PAYMENTREQUEST_0_QTY0=".urlencode('1');
   		
   		$nvpstr .= "&PAYMENTREQUEST_0_ITEMAMT=".urlencode('600.00');
   		$nvpstr .= "&PAYMENTREQUEST_0_TAXAMT=".urlencode('114.00');
   		$nvpstr .= "&PAYMENTREQUEST_0_SHIPPINGAMT=".urlencode('0.00');
   		$nvpstr .= "&PAYMENTREQUEST_0_HANDLINGAMT=".urlencode('3.00');
   		$nvpstr .= "&PAYMENTREQUEST_0_SHIPDISCAMT=".urlencode('-3.00');
   		
   		$nvpstr .= "&PAYMENTREQUEST_0_AMT=".urlencode('714.00');
   		$nvpstr .= "&PAYMENTREQUEST_0_CURRENCYCODE=".urlencode('EUR');
   		$nvpstr .= "&ALLOWNOTE=".urlencode('1');

              $response = $this->paypal->callerToPaypal('SetExpressCheckout', $nvpstr);
 
Zuletzt bearbeitet:
Zurück