1

I'm trying to add braintree payment using soap api v2, but when I call shoppingCartOrder function receive the next error "There was an error capturing the transaction. (Transaction deckined: Cannot determine payment method.)

I have not problems using the same code but checkmo as payment method

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:api="http://127.0.0.1/Integrics/Enswitch/API"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
       <api:shoppingCartPaymentMethod soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
           <sessionId>$token</sessionId>
           <quoteId>$quoteId</quoteId>
           <method>
               <method>braintree</method>
               <cc_cid>123</cc_cid>
               <cc_number>4111111111111111</cc_number>
               <cc_type>VI</cc_type>
               <cc_exp_year>2020</cc_exp_year>
               <cc_exp_month>12</cc_exp_month>
           </method>
       </api:shoppingCartPaymentMethod>
   </soapenv:Body>
</soapenv:Envelope>
2

If you are still looking for answer.. While setting payment method to cart you have to pass valid method code for that particular payment. Also please note that Setting payment method from API only supports the methods which you get in shoppingCartPaymentList method,

so basic steps should be get list of applicable payment method for cart. read payment method code and pass while setting payment method code while setting.

to get list of valid payment methods, refer below link http://www.magentocommerce.com/api/soap/checkout/cartPayment/cart_payment.list.html to set payment method to cart refer this. http://www.magentocommerce.com/api/soap/checkout/cartPayment/cart_payment.method.html

  • Hi, thanks for your answer, but the error is raised on shoppingCartOrder. The payment method is valid. When you try to add a invalid method the error message is "Payment method is not allowed" and is raised on shoppingCartPaymentMethod – masanchez Jan 21 '15 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.