我正在将 Klarna 集成到与 Adyen 相关的沙盒环境中。我已经精确地遵循了文档,但遇到了一个问题,即小部件中没有显示“继续”按钮,从而阻止了结帐过程。
-预期的-
-实际(缺少按钮)-
重新创建的代码:
发布到: https://checkout-test.adyen.com/v67/payments
{
"merchantAccount": "MERCHANTLLC",
"reference": "123",
"paymentMethod": {
"type": "klarna_account"
},
"amount": {
"currency": "USD",
"value": 18210
},
"shopperLocale": "en_US",
"countryCode": "US",
"telephoneNumber": "1111111111",
"shopperEmail": "test@gmail.com",
"shopperName": {
"firstName": "John",
"lastName": "Doe"
},
"returnUrl": "http://someurl.com",
"lineItems": [
{
"quantity": 1,
"amountExcludingTax": "16900",
"taxPercentage": "775",
"description": "asdfasdf",
"id": "123",
"taxAmount": 1310,
"amountIncludingTax": "18210",
"productUrl": "http://producturl.com"
}
]
}
Run Code Online (Sandbox Code Playgroud)
它返回client_token:“ABC123”。然后使用该令牌通过klarna 文档加载小部件:
window['Klarna']['Payments'].init({
client_token: 'ABC123'
})
window['Klarna']['Payments'].load({
container: …Run Code Online (Sandbox Code Playgroud)