Unturch TypeError:无法阅读未定义的属性(Reading' substr')Paypal Plus Brazil

发布于 2025-01-25 03:38:40 字数 1782 浏览 3 评论 0 原文

我试图根据以下文档将巴西PayPal Plus集成 https://developer.payvelighter.paypal.com/develicer.paypal.com/develi /payment-selection-page/

我从文件

ppplusdcc.js:格式化:5349未访问的typeerror:无法阅读 未定义的属性(读取“ substr”) 在function.q [as docheckout](ppplusdcc.js:格式:5349:25) 在swagpaypalpluspaymentwall.afterpayorder(payment-wall.js?27e3:300:1) 在xmlhttprequest.eval(http-client.service.js?93cb:133:1)

文件中的cookie名称是paypalplus_session,

如果我们打印cookie,我们会得到以下值

collectBillingAddress:false
国家:“ BW”
disallyrememberedcard:false
Ectoken:“ EC-87B846367D652562M”
语言:“ en_gb”
模式:“沙盒”
付款人邮件:“ ” PAYERFIRSTNAME:“ John”
PAIMERLASTNAME:“ DOE”
付费电话:“ 0634312345”
payertaxid:“”
payertaxidtype:“”
记住:“” 第三疗法:{}
UserAction:“ commit”
[[原型]]:对象

从ppplusdcc.min.js文件中的cookie访问对象'PaymentMethod'变量。但是它实际上不存在于cookie中。

有人知道为什么cookie中未设置“付款方式”变量?

I am trying to integrate Paypal plus for Brazil(Sandbox) based on the following documentation
https://developer.paypal.com/docs/regional/br/payment-selection-page/

I am getting the error from https://www.paypalobjects.com/webstatic/ppplusdcc/ppplusdcc.min.js file

ppplusdcc.js:formatted:5349 Uncaught TypeError: Cannot read
properties of undefined (reading 'substr')
at Function.Q [as doCheckout] (ppplusdcc.js:formatted:5349:25)
at SwagPayPalPlusPaymentWall.afterPayOrder (payment-wall.js?27e3:300:1)
at XMLHttpRequest.eval (http-client.service.js?93cb:133:1)

The cookie name inside the file is paypalplus_session

If we print the cookie we get the following values

collectBillingAddress: false
country: "BW"
disallowRememberedCards: false
ecToken: "EC-87B846367D652562M"
language: "en_GB"
mode: "sandbox"
payerEmail: "[email protected]"
payerFirstName: "John"
payerLastName: "Doe"
payerPhone:"0634312345"
payerTaxId: ""
payerTaxIdType: ""
rememberedCards: ""
thirdPartyMethods: {}
useraction: "commit"
[[Prototype]]: Object

'paymentMethod' variable is accessed from the cookie in ppplusdcc.min.js file. but it actually does not exist in the cookie.

Does anybody know why the 'paymentMethod' variable is not set in the cookie?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云巢 2025-02-01 03:38:40
  1. 创建国家:巴西。


  2. 创建


  3. 更改您的集成以使用该应用程序的客户端ID和所有API调用的秘密。

  1. Create a sandbox Business account of country: Brazil.

  2. Create a REST App for that Brazil account.

  3. Change your integration to use that App's client-id and secret for all API calls.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文