I have a very strange problem. I use PayPal Checkout and every thing seems to go well. I receive this reply form paypal: stdClass Object
(
[id] => PAYID-LOOODWQ3V134668VN609961J
[intent] => sale
[state] => created
[cart] => 6T4457258E850283U
[payer] => stdClass Object
(
[payment_method] => paypal
[status] => VERIFIED
[payer_info] => stdClass Object
(
[email] => *****@*******
[first_name] => Valerio
[last_name] => Murolo
[payer_id] => BD53Q77LZ54PL
[shipping_address] => stdClass Object
(
[recipient_name] => valerio Murolo
[line1] => Corso Marconi 4/7bis
[city] => Genova
[state] => GE
[postal_code] => 16129
[country_code] => IT
)
[country_code] => IT
)
)
[transactions] => Array
(
[0] => stdClass Object
(
[amount] => stdClass Object
(
[total] => 0.01
[currency] => EUR
)
[payee] => stdClass Object
(
[merchant_id] => 8NSRE3LRPC9RJ
[email] => ******@***********
)
[description] => Acquisto numero 150502
[custom] => 150502
[item_list] => stdClass Object
(
[items] => Array
(
[0] => stdClass Object
(
[name] => Acquisto numero 150502
[price] => 0.01
[currency] => EUR
[tax] => 0.00
[quantity] => 1
)
)
[shipping_address] => stdClass Object
(
[recipient_name] => ************
[line1] => *******************
[city] => Genova
[state] => GE
[postal_code] => 16129
[country_code] => IT
)
)
[related_resources] => Array
(
)
)
)
[note_to_payer] => Contattaci per qualunque domanda sul tuo acquisto.
[redirect_urls] => stdClass Object
(
[return_url] => https://www.paypal.com/?paymentId=PAYID-LOOODWQ3V134668VN609961J
[cancel_url] => https://www.paypal.com
)
[create_time] => 2018-09-15T10:41:30Z
[update_time] => 2018-09-15T10:41:45Z
[links] => Array
(
[0] => stdClass Object
(
[href] => https://api.paypal.com/v1/payments/payment/PAYID-LOOODWQ3V134668VN609961J
[rel] => self
[method] => GET
)
[1] => stdClass Object
(
[href] => https://api.paypal.com/v1/payments/payment/PAYID-LOOODWQ3V134668VN609961J/execute
[rel] => execute
[method] => POST
)
[2] => stdClass Object
(
[href] => https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6T4457258E850283U
[rel] => approval_url
[method] => REDIRECT
)
)
) But when I go to the occount (both buyer and seller) there is no payment. <div id="paypal-button" style='margin:auto;'></div>
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<script>
paypal.Button.render({
// Configure environment
env: 'production',
client: {
sandbox: '------------------------',
production: '---------------------------'
},
// Customize button (optional)
locale: 'it_IT',
style: {
size: 'responsive',
color: 'gold',
shape: 'pill',
},
funding: {
allowed: [ paypal.FUNDING.CARD, paypal.FUNDING.CREDIT, paypal.FUNDING.ELV ],
disallowed: [ ]
},
// Set up a payment
payment: function(data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '<?= ($prezzo_tot+$costo_spedizione) ?>',
currency: 'EUR'
},
description: 'Acquisto numero <?= $carrello->id ?>',
custom: '<?= $carrello->id ?>',
//invoice_number: '12345', Insert a unique invoice number
item_list: {
items: [
{
name: 'Acquisto numero <?= $carrello->id ?>',
quantity: '1',
price: '<?= ($prezzo_tot+$costo_spedizione) ?>',
tax: '0.00',
currency: 'EUR'
}]
}
}],
note_to_payer: 'Contattaci per qualunque domanda sul tuo acquisto.'
});
},
onAuthorize: function(data, actions) {
// 2. Make a request to your server
return actions.request.post('payment.php', {
paymentID: data.paymentID,
payerID: data.payerID,
token: data.paymentToken,
product_id: <?= $carrello->id ?>
})
.then(function(res) {
//location.href="http://www.materese.com/index.php?p=paginaOK";
});
}
}, '#paypal-button');
</script> So i should be in produciotn way. I think it's something very simple but I can't unserstand. Should I do sonthing on my profile to activate it to work rightly? Thanks for any advice.
... View more