Magento – How to integrate Paypal Express Checkout with the Magento API

apipayment-methodspaypal-express

I am building a custom store using the Magento APIs. Everything upto shipping is working, but I'm stuck at billing.

  • I have enabled the Check/Money Order payment method and thats working fine. But I need to integrate Paypal Express Checkout in my custom store.

  • I have configured Paypal Express Checkout option as needed in the Payment Methods configuration section.

  • The cart_payment.list API call is only returning 'Check/Money Order' as the available payment method.

  • The Paypal Express Checkout option is not returned.

Is it possible to somehow list the Paypal Express Checkout option as well in the cart_payment.list API call response?


[ { code: 'checkmo', title: 'Check / Money order', ccTypes: null } ]

As you can see, it returns Check/Money Order with a code checkmo. I need to know the code for Express Checkout.

Any help is appreciated.

Best Answer

From Mage_Paypal_Model_Express class:

protected $_code  = Mage_Paypal_Model_Config::METHOD_WPP_EXPRESS;

Then from Mage_Paypal_Model_Config class:

const METHOD_WPP_EXPRESS = 'paypal_express';

So the code for paypal express is (surprisingly) paypal_express.

Related Topic