cancel
Showing results for 
Search instead for 
Did you mean: 

Please select a valid payment method (version 1.9.0.1)

Please select a valid payment method (version 1.9.0.1)

After creating card via 'cart.create', I set payment via 'cart_payment.method'. I used the following code sample and it only works when I set payment method to "purchaseorder" ("method" => "purchaseorder"). Otherwise, it throws faultcode:1008(Please select a valid payment method).

$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');

$shoppingCartId = $proxy->call( $sessionId, 'cart.create', array( 'magento_store' ) );

$paymentMethod = array(
"method" => "checkmo"
);

$resultPaymentMethod = $proxy->call(
$sessionId,
"cart_payment.method",
array(
$shoppingCartId,
$paymentMethod
)
);

Reference: http://devdocs.magento.com/guides/m1x/api/soap/checkout/cartPayment/cart_payment.method.html

 

I asked the above question on Github(https://github.com/magento/devdocs/issues/920) and realised that this is a known issue (SUPEE-4952). So my question is if it's a known issue, then I was wondering how I can differentiate between different payments like CC and Paypal in Magento.