【问题标题】:paypal v.zero test nonce failing with no error messagepaypal v.zero 测试随机数失败,没有错误消息
【发布时间】:2016-08-07 21:10:19
【问题描述】:

我正在尝试使用 Braintree ruby​​ gem 中提供的测试随机数来测试 paypal v.zero 的集成。注意 - 在paypal integration guide 之后。我能够通过手动完成结帐过程(输入测试贝宝信息,提交订单)生成的付款随机数运行成功授权,但测试随机数provided by Braintree失败,错误结果不包括除“处理器拒绝”。

测试代码:

braintree_gateway = Braintree::Gateway.new(
  access_token: Figaro.env.BRAINTREE_ACCESS_TOKEN
)

result = braintree_gateway.transaction.sale(
  amount: "10.00",
  payment_method_nonce: Braintree::Test::Nonce::PayPalOneTimePayment
)

结果:

#<Braintree::ErrorResult params:{...} 
errors:<> 
transaction: #<Braintree::Transaction id: "ddz5mc", type: "sale", amount: "10.0", status: "processor_declined", created_at: 2016-04-15 02:55:13 UTC, credit_card_details: #<token: nil, bin: nil, last_4: nil, card_type: nil, expiration_date: "/", cardholder_name: nil, customer_location: nil, prepaid: "Unknown", healthcare: "Unknown", durbin_regulated: "Unknown", debit: "Unknown", commercial: "Unknown", payroll: "Unknown", country_of_issuance: "Unknown", issuing_bank: "Unknown", image_url: "https://assets.braintreegateway.com/payment_method_logo/unknown.png?environment=sandbox">, customer_details: #<id: nil, first_name: nil, last_name: nil, email: nil, company: nil, website: nil, phone: nil, fax: nil>, subscription_details: #<Braintree::Transaction::SubscriptionDetails:0x007f98ef8958c0 @billing_period_end_date=nil, @billing_period_start_date=nil>, updated_at: 2016-04-15 02:55:14 UTC>>

Braintree 测试随机数是否不应该适用于 paypal 集成方法?如果是这样,是否有人知道另一种方法来生成用于测试目的的贝宝付款随机数(除了手动完成结帐过程)?提前致谢。

【问题讨论】:

    标签: ruby testing paypal braintree


    【解决方案1】:

    全面披露:我为 Braintree 工作。

    你是对的 - 你提到的测试随机数是用于与 Braintree 的直接集成。由于您正在与 PayPal 集成,因此我建议您在探索其他方法来测试您的实现时坚持使用 PayPal 开发人员文档。

    【讨论】:

    • 有什么更新吗?如何对我的贝宝快速结帐流程进行单元测试?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-29
    • 2015-11-21
    • 2020-03-13
    • 2016-01-31
    • 2021-06-03
    • 1970-01-01
    相关资源
    最近更新 更多