【发布时间】:2018-07-27 15:07:38
【问题描述】:
Braintree 使用客户 ID 查找客户返回一个响应对象,其中包含作为 getgateway(key) 的值的函数......并且 firebase 拒绝将响应推送到数据库中......
有错误
错误:Firebase.set 失败:第一个参数包含一个函数 财产 'Wallets.qN5RmUgatwbianIuYYHmLX6GGrC3.Accountdetails.creditCards.0.getGateway' 内容: () => 网关
有人遇到过这个问题并解决了吗?这是我的代码:
find braintree user result: Customer {
id: '185946869',
merchantId: 'hjctjwrqxh6t3qhf',
firstName: 'kayak@gmail.com',
lastName: '',
company: '',
email: 'kayak@gmail.com',
phone: '',
fax: '',
website: '',
createdAt: '2018-02-16T10:28:47Z',
updatedAt: '2018-02-16T10:29:15Z',
customFields: '',
creditCards:
[ CreditCard {
bin: '411111',
cardType: 'Visa',
cardholderName: null,
commercial: 'Unknown',
countryOfIssuance: 'Unknown',
createdAt: '2018-02-16T10:29:15Z',
customerId: '185946869',
customerLocation: 'US',
debit: 'Unknown',
default: true,
durbinRegulated: 'Unknown',
expirationMonth: '02',
expirationYear: '2019',
expired: false,
healthcare: 'Unknown',
imageUrl: 'https://assets.braintreegateway.com/payment_method_logo/visa.png?environment=sandbox',
issuingBank: 'Unknown',
last4: '1111',
payroll: 'Unknown',
prepaid: 'Unknown',
productId: 'Unknown',
subscriptions: [],
token: 'fbm3yx',
uniqueNumberIdentifier: '1077b77aa2b0c0821e51ad010e31ee93',
updatedAt: '2018-02-16T10:29:17Z',
venmoSdk: false,
verifications: [],
getGateway: [Function],
maskedNumber: '411111******1111',
expirationDate: '02/2019' } ],
addresses: [],
getGateway: [Function],
paymentMethods:
[ CreditCard {
bin: '411111',
cardType: 'Visa',
cardholderName: null,
commercial: 'Unknown',
countryOfIssuance: 'Unknown',
createdAt: '2018-02-16T10:29:15Z',
customerId: '185946869',
customerLocation: 'US',
debit: 'Unknown',
default: true,
durbinRegulated: 'Unknown',
expirationMonth: '02',
expirationYear: '2019',
expired: false,
healthcare: 'Unknown',
imageUrl: 'https://assets.braintreegateway.com/payment_method_logo/visa.png?environment=sandbox',
issuingBank: 'Unknown',
last4: '1111',
payroll: 'Unknown',
prepaid: 'Unknown',
productId: 'Unknown',
subscriptions: [],
token: 'fbm3yx',
uniqueNumberIdentifier: '1077b77aa2b0c0821e51ad010e31ee93',
updatedAt: '2018-02-16T10:29:17Z',
venmoSdk: false,
verifications: [],
getGateway: [Function],
maskedNumber: '411111******1111',
expirationDate: '02/2019' } ] }
过去几天我一直遇到 Braintree respose 对象的问题。我的 API 调用有问题吗?或者 API 服务发生了一些变化。
【问题讨论】:
-
您使用的是哪个版本的 Braintree 的 Node SDK?您最近是否对依赖版本或对 Braintree 的 API 调用进行了任何更改?
-
“braintree”:“^2.3.0”。不,我没有对依赖项进行任何更改,在braintree api调用失败后进行了一些调试并发现这是问题所在。如果响应是简单的对象,那么我正在对数据进行规范化,但这个响应似乎有点复杂。感谢您的回复。
标签: node.js firebase paypal braintree