Make payment method active only for API
-
30-09-2020 - |
Domanda
To start I have already modified the check/money order payment method to be available only in admin (That worked, but not via the API)
The problem is that the method is not available to the V1 API. Here is how I am setting the cart
$cart = $proxy->call( $sessionId, 'cart.create', 0);
(Store 0 is Admin)
$result = $proxy->call($sessionId, "cart_payment.list", array($cart));
Where I get my list of methods only those available on the frontend are working. What I need is a method that is only available via the API.
Soluzione
This solution worked!
$apiRunning = Mage::getSingleton('api/server')->getAdapter() != null;
Thank you for your help.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange