首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Braintree下拉用户界面Paypal集成不加载

Braintree下拉用户界面Paypal集成不加载
EN

Stack Overflow用户
提问于 2022-04-08 00:00:40
回答 1查看 350关注 0票数 3

我已经加载了UI中的下拉列表,我的auth工作,UI加载正确,但当我单击Paypal Checkout,一个新窗口弹出,它仍然是关于:空白的5-10,然后它关闭。UI然后声明:⚠在我们的终端出了问题。

在控制台里我得到:

代码语言:javascript
运行
复制
{
country: "US"
env: "sandbox"
errtype: "[object Error]"
host: "www.sandbox.paypal.com"
lang: "en"
pageID: "cd1b0e1c50"
path: "/smart/button"
prev_corr_ids: ""
referer: "https://localhost:7244"
stack: "Error: No ack for postMessage postrobot_method in https://www.sandbox.paypal.com in 10000ms\n    at o (https://www.paypalobjects.com/api/checkout.min.js:2:134213)"
timestamp: 1649373277263
uid: {{uId}}
ver: "4.0.334"
windowID: "3a6eb34307"
}

下面是插入UI的初始化配置:

代码语言:javascript
运行
复制
{
authorization: "*********"
container: "#braintree_container"
paypal:{
   amount: "$487.88"
   currency: "USD"
   flow: "checkout"
   }
}

我使用了已知的工作证书,但没有用,尽管它们都是众所周知的良好证书,但仍然不起作用。在深入了解请求时,似乎是在web.paypal-checkout.createPayment POST调用之后的某个地方。它似乎成功地建立了计费协议,获取了电子令牌,进行了UpdateClientConfig graphql调用,但从不向sandbox.paypal.com/smart/api/checkout/{{ectoken}}/appData?端点发出呼叫。

在内部应用程序中,它似乎在updateClientConfig调用之后失败。它从不填充弹出窗口,也不放置覆盖。附件是用于内部应用程序的HAR文件和用于比较的工作代码。这些HAR文件包括所有调用后,贝宝黄金按钮被点击。我在此详列有关的回应,以作裁员之用。

内部-非工作解决方案

分析有效载荷:

代码语言:javascript
运行
复制
{
    "analytics": [
        {
            "kind": "web.dropin.selected.paypal",
            "timestamp": 1649854187
        }
    ],
    "_meta": {
        "merchantAppId": "localhost:7244",
        "platform": "web",
        "sdkVersion": "3.80.0",
        "source": "client",
        "integration": "dropin2",
        "integrationType": "dropin2",
        "sessionId": {{sId}},
        "dropinVersion": "1.31.2"
    },
    "braintreeLibraryVersion": "3.80.0",
    "authorizationFingerprint": {{token}}
}

安装帐单协议响应:

代码语言:javascript
运行
复制
{
    "agreementSetup": {
        "tokenId": {{paymentToken}},
        "approvalUrl": "https://www.sandbox.paypal.com/agreements/approve?nolegacy=1\u0026ba_token={{paymentToken}}"
    }
}

电子令牌响应:

代码语言:javascript
运行
复制
{
    "ack": "success",
    "data": {
        "type": "ba-token",
        "token": {{paymentToken}}
    },
    "meta": {
        "calc": "6496f6f13b1bb",
        "rlog": "rZJvnqaaQhLn%2FnmWT8cSUueWscmrtUHe5Y1Bd%2FeqyvyOTq66rSXAciiXRg7dClMl1o2iporwJbYz7mI0k8X%2B5ryRC%2FRgCX6v_18022f916a7"
    },
    "server": {{serverId}}
}

UpdateClientConfig图形库:

请求:

代码语言:javascript
运行
复制
            mutation UpdateClientConfig(
                $paymentToken : String!,
                $fundingSource : ButtonFundingSourceType!,
                $integrationArtifact : IntegrationArtifactType!,
                $userExperienceFlow : UserExperienceFlowType!,
                $productFlow : ProductFlowType!,
                $buttonSessionID : String
            ) {
                updateClientConfig(
                    token: $paymentToken,
                    fundingSource: $fundingSource,
                    integrationArtifact: $integrationArtifact,
                    userExperienceFlow: $userExperienceFlow,
                    productFlow: $productFlow,
                    buttonSessionID: $buttonSessionID
                )
            }
        
{
  "paymentToken": {{paymentToken}},
  "fundingSource": "paypal",
  "integrationArtifact": "JS_V4",
  "userExperienceFlow": "INCONTEXT",
  "productFlow": "SMART_PAYMENT_BUTTONS",
  "buttonSessionID": null
}

响应:

代码语言:javascript
运行
复制
{
  "data": {
    "updateClientConfig": null
  },
  "extensions": {
    "tracing": {
      "version": 1,
      "startTime": "2022-04-13T12:49:51.854Z",
      "endTime": "2022-04-13T12:49:51.938Z",
      "duration": 84116563,
      "execution": {
        "resolvers": [
          {
            "path": [
              "updateClientConfig"
            ],
            "parentType": "Mutation",
            "fieldName": "updateClientConfig",
            "returnType": "Boolean",
            "startOffset": 1044862,
            "duration": 83027846
          }
        ]
      }
    },
    "correlationId": "3535ba30e2627"
  }
}

工作CODEPEN溶液

分析有效载荷:

代码语言:javascript
运行
复制
{
    "analytics": [
        {
            "kind": "web.paypal-checkout.createPayment",
            "isAsync": false,
            "timestamp": 1649854795783
        }
    ],
    "braintreeLibraryVersion": "braintree/web/3.85.3",
    "_meta": {
        "merchantAppId": "cdpn.io",
        "platform": "web",
        "sdkVersion": "3.85.3",
        "source": "client",
        "integration": "dropin2",
        "integrationType": "dropin2",
        "sessionId": {{sId}},
        "dropinVersion": "1.33.1"
    },
    "authorizationFingerprint": {{token}}
}

安装帐单协议响应:

代码语言:javascript
运行
复制
{
    "agreementSetup": {
        "tokenId": {{paymentToken}},
        "approvalUrl": "https://www.sandbox.paypal.com/agreements/approve?nolegacy=1\u0026ba_token={{paymentToken}}"
    }
}

电子令牌响应:

代码语言:javascript
运行
复制
{
    "ack": "success",
    "data": {
        "type": "ba-token",
        "token": {{paymentToken}}
    },
    "meta": {
        "calc": "3f508c09dd431",
        "rlog": "rZJvnqaaQhLn%2FnmWT8cSUueWscmrtUHe5Y1Bd%2FeqyvyOTq66rSXAciiXRg7dClMl1o2iporwJbYz7mI0k8X%2B5vvp6t7dnU%2B%2B_180230253f6"
    },
    "server": {{serverId}}
}

UpdateClientConfig图形库:

请求:

代码语言:javascript
运行
复制
            mutation UpdateClientConfig(
                $paymentToken : String!,
                $fundingSource : ButtonFundingSourceType!,
                $integrationArtifact : IntegrationArtifactType!,
                $userExperienceFlow : UserExperienceFlowType!,
                $productFlow : ProductFlowType!,
                $buttonSessionID : String
            ) {
                updateClientConfig(
                    token: $paymentToken,
                    fundingSource: $fundingSource,
                    integrationArtifact: $integrationArtifact,
                    userExperienceFlow: $userExperienceFlow,
                    productFlow: $productFlow,
                    buttonSessionID: $buttonSessionID
                )
            }
        
{
  "paymentToken": {{paymentToken}},
  "fundingSource": "paypal",
  "integrationArtifact": "JS_V4",
  "userExperienceFlow": "INCONTEXT",
  "productFlow": "SMART_PAYMENT_BUTTONS",
  "buttonSessionID": null
}

响应:

代码语言:javascript
运行
复制
{
  "data": {
    "updateClientConfig": null
  },
  "extensions": {
    "tracing": {
      "version": 1,
      "startTime": "2022-04-13T12:59:57.407Z",
      "endTime": "2022-04-13T12:59:57.491Z",
      "duration": 84834935,
      "execution": {
        "resolvers": [
          {
            "path": [
              "updateClientConfig"
            ],
            "parentType": "Mutation",
            "fieldName": "updateClientConfig",
            "returnType": "Boolean",
            "startOffset": 1231858,
            "duration": 83540568
          }
        ]
      }
    },
    "correlationId": "f6e5896873a1"
  }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-04-13 18:32:48

对于我的具体问题,VS2022打开一个带有默认调试开关的chrome窗口,这会干扰Braintree Paypal集成的功能。具体来说,它似乎是--disable-background-networking交换机。一旦我禁用了这个开关,Paypal就可以正常工作了。打开一个新窗口并导航到路径或使用不同的浏览器也将解决此问题。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71790224

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档