Hello, I'm implementing a paypal payment process using the smart payment buttons. When I start the payment process I already have the payer's informations (name, address, phone number) but I can't get the standard card fields filled in with those informations. I pass to paypal all the informations in the actions.order.create function as in the following sample page code: <!DOCTYPE html>
<html> <head> <meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Ensures optimal rendering on mobile devices. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Optimal Internet Explorer compatibility --> </head> <body>
<!-- PAYPAL SCRIPT SECTION-->
<script src="https://www.paypal.com/sdk/js?client-id=Ab-iApjF2wHobvZCPkBsv2ecGsXu_VlMfh9GMLvwsIRJ6ToHkjaOoxinUN0LGO7Ud3q_TsgIjPmHK15v¤cy=EUR"></script>
<!-- END PAYPAL SECTION -->
<div id="paypal-button-container"></div>
<script>
paypal.Buttons({
locale: 'it_IT',
style: {
layout: 'vertical',
color: 'gold',
shape: 'pill',
label: 'pay',
height: 40
},
enableStandardCardFields: true,
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
currency_code: "EUR",
description: 'Event description',
value: '10'
},
intent: 'CAPTURE',
payer: {
name: {
given_name: "PayPal",
surname: "Customer"
},
address: {
address_line_1: ' <removed>',
address_line_2: ' <removed>',
admin_area_2: ' <removed>',
admin_area_1: 'CA',
postal_code: ' <removed>',
country_code: 'US'
},
email_address: "mail_adress",
phone: {
phone_type: "MOBILE",
phone_number: {
national_number: "<removed>"
}
}
}
}]
});
},
onApprove: function(data, actions) {
// This function captures the funds from the transaction.
return actions.order.capture().then(function(details) {
// Go to the payment confirmation page
var url="www.google.it";
window.location = url;
});
}
}).render('#paypal-button-container');
</script>
</body>
</html> Someone may help me? Many thanks, Luca
... View more