|
From digging through the codebase, it appears to be impossible to be able to set paypal_express as the payment option for checkout using the API.
Here’s why:
Mage_Paypal_Model_Express sets a number of flags, in particular:
$_isGateway = false;
$_canUseInternal = false;
Then, when setting the payment method to “paypal_express” via API “cart_payment.method”, it checks to see if it’s a valid payment option via the method in - Mage_Checkout_Model_Cart_Payment_Api :: _canUsePaymentMethod().
This method runs a test:
if ( !($method->isGateway() || $method->canUseInternal()) ) {
return false;
}
As mentioned at the start of this post, these flags are both set to false.
So you can see _canUsePaymentMethod wil *always* return false and we can never set paypal as a payment method!
This makes absolutely no sense! Can anyone offer some advice here?
Many thanks in advance,
MIke
|