vendredi 15 avril 2016

paypal v.zero test nonce failing with no error message

I am trying to test the paypal v.zero integration with the test nonces provided in the Braintree ruby gem. NOTE - following the paypal integration guide. I am able to run successful authorizations with payment nonces generated by going through the checkout process manually (entering in test paypal info, submitting order), but the test nonces provided by Braintree are failing and the error result does not include any error message besides "processor declined".

Test code:

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
)

The result:

#<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: "http://ift.tt/1Ww1MGZ">, 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>>

Are the Braintree test nonces not supposed to work for the paypal integration method? If so, does anybody know an alternative method to generate paypal payment nonces for testing purposes (besides manually going through the checkout process)? Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire