2
PayPal Plus'ı, "Fatura Öde" hariç, siteme başarıyla entegre ediyorum. Kullandığım Bu hata mesajı alıyorum "Fatura üzerine Öde" çalıştığınızdaPayPal Plus Sandbox - Fatura Öde
<script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js"
type="text/javascript"></script>
<script type="application/javascript">
var ppp = PAYPAL.apps.PPP({
"approvalUrl": "<?= $createPaymentArr['links'][1]['href']; ?>",
"placeholder": "ppplus",
"language": "de_DE",
"mode": "sandbox",
"showPuiOnSandbox": "true",
"country": "DE"
});
</script>
:
İşte ödeme duvarını entegre etmek için benim JavaScript kodu "Maalesef satın alma işleme koyamayız"
Benim API çağrısı:
$fields = '{
"intent":"sale",
"redirect_urls":{
"return_url":"http://XYZ.info/ABC/paypal/index.php",
"cancel_url":"http://XYZ.info/ABC/paypal/index.php"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"EUR",
"details":{
"subtotal":"7.41",
"tax":"0.03",
"shipping":"0.03"
}
},
"item_list":{
"items":[
{
"quantity":"1",
"name":"XYZ",
"price":"7.41",
"currency":"EUR"
}
],
"shipping_address":{
"line1":"XYZ Straße 587",
"city":"OPA",
"postal_code":"12345",
"country_code":"DE"
}
},
"description":"XYZ.info Warenkorb"
}
]
}';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api".$mode.".paypal.com/v1/payments/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $fields,
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer ".$arr['access_token'],
"Content-Type: application/json"
),
));
Tam olarak aynı sorun var ve sadece fikir tükendi. – Chris