如何正确显示 Klarna Pay Over Time 小部件? [英] How to get Klarna Pay Over Time widget displayed correctly?

查看:34
本文介绍了如何正确显示 Klarna Pay Over Time 小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 Klarna 集成到与 Adyen 相关的沙盒环境中.我严格按照

-实际(缺少按钮)-

重新创建的代码:

发布到:https://checkout-test.adyen.com/v67/payments

<代码>{merchantAccount":MERCHANTLLC",参考":123",支付方式":{类型":klarna_account";},金额":{货币":美元",值":18210},shopperLocale":en_US",国家代码":美国",电话号码":1111111111",shopperEmail":test@gmail.com",购物者姓名":{名字":约翰",姓氏":母鹿"},returnUrl":http://someurl.com",行项目":[{数量":1,金额不含税":16900",taxPercentage":775",描述":asdfasdf",id":123",税额":1310,金额含税":18210",productUrl":http://producturl.com"}]}

返回client_token:ABC123".然后使用该令牌通过 klarna 加载小部件文档:

 window['Klarna']['Payments'].init({客户端令牌:'ABC123'})window['Klarna']['Payments'].load({容器:'#klarna-payments-container',payment_method_category: 'pay_over_time',instance_id:klarna-payments-instance";},功能(资源){控制台日志(res);})

  1. 回调返回的是 {show_form: true} 并且小部件加载上面的 ACTUAL (MISSING BUTTON) 图片.我在这里错过了什么?我不明白为什么小部件中没有显示继续按钮.此按钮用于在 Klarna 中授权用户、获取账单信息等.任何帮助将不胜感激!目标是显示继续"按钮.

解决方案

在与 Klarna 团队交谈后回答我自己的问题.在开发端,您需要创建自己的按钮并调用授权"端点.文档可以在这里找到:https://developers.klarna.com/documentation/klarna-payments/integration-guide/authorize/

I'm integrating Klarna in a sandbox environment that is tied to Adyen. I have followed the docs precisely but am having an issue where there is no "continue" button showing in the widget thus blocking the checkout process.

-EXPECTED-

-ACTUAL (MISSING BUTTON)-

Code to re create:

Post to: 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"
    }
  ]
}

which returns the client_token: "ABC123". That token is then used to load the widget via the klarna docs:

 window['Klarna']['Payments'].init({
      client_token: 'ABC123'
    })
    window['Klarna']['Payments'].load({
      container: '#klarna-payments-container',
      payment_method_category: 'pay_over_time',
      instance_id: "klarna-payments-instance"
    },
      function (res) {
        console.log(res);
      })

  1. What is returned from the callback is {show_form: true} and the widget loads with the ACTUAL (MISSING BUTTON) picture above. What am i missing here?? I don't understand why I don't have a continue button showing up in the widget. This button is what then authorizes the user in Klarna, takes billing info, etc. Any help would be greatly appreciated! The goal is to get the 'Continue' button showing.

解决方案

Answering my own question after speaking to the Klarna team. On the dev side you need to create your own button and call the 'Authorize' endpoint. Documentation can be found here: https://developers.klarna.com/documentation/klarna-payments/integration-guide/authorize/

这篇关于如何正确显示 Klarna Pay Over Time 小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆