New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect Amazon Pay Button with Amazon Pay Widget #577
Comments
Hi @hiren-ganatra, I'm not sure if it'd work if you just pull in a library from npm as its version might not be compatible with the version we're using. Anyway, I believe you can initialise the Amazon Pay login button using service.initializeCustomer({
methodId: 'amazon',
amazon: {
container: 'amazon-button'
}
}); That will render an Amazon Pay login button in the specified container. Hopefully that would resolve your session issue. |
Hi @hiren-ganatra, it seems to me that the container (with |
Hi @davidchin , Thanks for the reply and yes we are able to initialize the amazon pay button with once customer logs in via amazon pay button then some how shipping options are not appearing on checkout page. In the "scope" parameter it is passing "payments:billing_address payments:shipping_address payments:widget profile" and i think it should use "payments:widget profile" I have tried to pass the scope while
and also Is Thanks again for showing us the way to initialize the amazon button without using npm package and we are looking to eleminate the npm package. :) |
Hi @davidchin I am also having the same issue as hiren above. Can you please help!? |
Hi @hiren-ganatra, the |
Hi @davidchin , Thanks for the reply and we have tried to use amazon address widget with the use of componentDidUpdate(){
if(!this.state.amazonButtonInitialized){
const { data, errors, statuses } = this.state;
this.service.initializeCustomer({
methodId: 'amazon',
amazon: {
container: 'AmazonPayButton'
}
});
this.setState({ amazonButtonInitialized: true });
this.service.initializeShipping({
methodId: 'amazon',
amazon: {
container: 'AmazonAddressBook'
}
});
console.log('getInitializeShippingError',errors.getInitializeShippingError());
}
} and in the console we are getting : As per the above screenshot the address widget is initialized but in the iframe src is unknown So , what we are missing to initialize the address widget ? Thanks again for guiding us to connect amazon pay with our website :) |
Hi @hiren-ganatra, I think in order for |
Hi @davidchin - I'm currently building a custom checkout in Vue using the sdk. It's working great, but I'm running into an issue trying to hook up Amazon Pay. I am able to get the login button to display. When I click it and login to Amazon, I am redirected back to my actual live website, not my local stencil version. How do you recommend telling Amazon to redirect me back to the domain from which the request came? In this case, Also, just to clarify, I have already added localhost as an allowed origin and return url within my Amazon account. I just don't know how to get the sdk to stop hardcoding my domain as the redirect url. |
I just realized this doesn't even work on the standard BigCommerce optimized single-page checkout. It still redirects to the live website. How are we supposed to develop this functionality if it won't redirect back to the localhost url? |
If we are able to get the widgets to appear on the checkout - how do we extract the information and submit payment if card and address is selected inside of the iframe provided by amazon? |
We are using React based checkout provided by big commerce to customize few things in checout page , here is the link of our website : https://www.babiesgetaway.com/
Now, for amazon pay button we have used one npm package as bigcommerce button initializer doesn't support amazon pay button initialization.
for amazon pay widget , we are using the default initializePayment service of big commerce :
this.service.initializePayment({ methodId: 'amazon', amazon: { container: 'walletWidgetDiv', onReady:this.amazonOnReady, onPaymentSelect:this.amazonOnPaymentSelect, onError:this.amazonOnError } })
Now, we are able to login & get the access_token via amazon pay button but when customer selects the "amazon pay" as an payment option , amazon pay widget is throwing error "buyer's session is expired"
so how do we connect amazon pay button with its widget ?
The text was updated successfully, but these errors were encountered: