Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Impossible to use Paypal with API?! 
 
MikeNatty
Jr. Member
 
Total Posts:  5
Joined:  2012-10-07
 

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

 
Magento Community Magento Community
Magento Community
Magento Community
 
MikeNatty
Jr. Member
 
Total Posts:  5
Joined:  2012-10-07
 

Sorry all, I seem to have posted this in POS topic, apologies.

I’ll repost in the correct place.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top