This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add Login and Pay callbacks | |
window.onAmazonPaymentsReady = () => { | |
this.createButton(sellerId, scope, type, color, size, mountLocation); | |
} | |
// if the OffAmazonPayments namespace is already available, call the callback manually - otherwise wait for Amazon to call it | |
if (typeof window.OffAmazonPayments !== 'undefined') { | |
window.onAmazonPaymentsReady(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"request": { | |
"type": "Connections.Response", | |
"requestId": "amzn1.echo-api.request.d82eb2de-f527-4a07-8367-136789101112", | |
"timestamp": "2018-10-09T14:36:16Z", | |
"locale": "de-DE", | |
"status": { | |
"code": "400", | |
"message": "InvalidPaymentMethod" | |
}, | |
"name": "Charge", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "Connections.SendRequest", | |
"name": "Charge", | |
"payload": { | |
"@type": "ChargeAmazonPayRequest", | |
"@version": "2", | |
"sellerId": "A1RN901234567", | |
"billingAgreementId": "B02-9069520-1234567", | |
"paymentAction": "Authorize", | |
"authorizeAttributes": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"requestEnvelope": { | |
"version": "1.0", | |
"session": { | |
"new": true, | |
"sessionId": "amzn1.echo-api.session.bcde", | |
"application": { | |
"applicationId": "amzn1.ask.skill.d2345" | |
}, | |
"user": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "Connections.SendRequest", | |
"name": "Charge", | |
"payload": { | |
"@type": "ChargeAmazonPayRequest", | |
"@version": "2", | |
"sellerId": "AABBCCDDEE", | |
"billingAgreementId": "C02-5320354-ABCDEFG", | |
"paymentAction": "AuthorizeAndCapture", | |
"authorizeAttributes": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"requestEnvelope": { | |
"version": "1.0", | |
"session": { | |
"new": true, | |
"sessionId": "amzn1.echo-api.session.012345", | |
"application": { | |
"applicationId": "amzn1.ask.skill.d23456" | |
}, | |
"user": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "Connections.SendRequest", | |
"name": "Setup", | |
"payload": { | |
"@type": "SetupAmazonPayRequest", | |
"@version": "2", | |
"sellerId": "AABBCCDDEE", | |
"countryOfEstablishment": "DE", | |
"ledgerCurrency": "EUR", | |
"checkoutLanguage": "de-DE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
#addressBookWidgetDiv{ | |
width: 400px; | |
height: 228px; | |
} | |
</style> | |
<!-- first place the diff wherever the widget should appear --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to parse address line | |
For DE and AT customers, usually the street is in the last address line (the last used one). If the customer is from DE or AT, the address line can be parsed using the following pseudo code algorithm: | |
if (country in ("AT","DE")) { | |
if (AddressLine3 != "") { | |
Street = AddressLine3 | |
if (AddressLine1 isNumber or AddressLine1 + AddressLine2 contains “Packstation”) { | |
PO box = AddressLine1 + AddressLine2 | |
} else { |