Hi there, I am integrating smart checkout button (documentation: https://developer.paypal.com/docs/checkout/integrate/#3-render-the-smart-payment-buttons) and listening to shipping address change. I am using below js code for rendering the button <script src="https://www.paypal.com/sdk/js?intent=authorize&client-id=MY_CLIENT_ID"> </script> <scipt> window.onload = function() { paypal.Buttons({ createOrder: function(data, actions) { /*below code can be replaced with an ajax call to server to create order request. refer https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/#on-the-client for info */ console.log('createOrder with payAmt: '+payAmt); return actions.order.create({ purchase_units: [{ amount: { value: payAmt } }] }); }, onApprove: function(data, actions) { // Authorize the transaction actions.order.authorize().then(function(authorization) { // Get the authorization id var authorizationID = authorization.purchase_units[0] .payments.authorizations[0].id // Call your server to validate and capture the transaction return fetch('/paypal-transaction-complete', { method: 'post', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ orderID: data.orderID, authorizationID: authorizationID }) }); }); }, onShippingChange: function(data, actions) { console.log('shipping changed: '+JSON.stringify(data)); // Reject all countries other than US if (data.shipping_address.country_code !== 'US' ) { return actions.reject(); } } } }).render('#paypal-button-container'); }; </script> During the checkout when shipping address is changed, the data I am getting in onShippingChange doesn't have the complete shipping address. It is missing a few fields like line1, line2. How can I get the complete shipping address here? Any help would be greatly appreciated Thanks & Regards, HKVP
... View more