When i trying get The Payment Methods using REST API , "rest/V1/carts/{cartId}/payment-methods" , it is returning Empty Array as a result.
I'm passing Admin Bearer Token as Authorization.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI am facing similar issue as of now. with guest-carta api.
https://www.example.com/rest/{store}/V1/guest-
carts/{quote_mask_id}/payment-information
What I did is I build a wrapper api of my own and called this api to initate order and then in case if the api response is empty I am calling sql query i.e
SELECT * FROM `quote_id_mask` WHERE `masked_id` =
'{QUOTE_KEY}'
or
SELECT * FROM `quote_id_mask` WHERE `quote_id` =
'{QUOTE_ID_MASK}'
It will give you entityID to initiate order for payment processing.
\Magento\Payment\Model\MethodInterface::isAvailable
it should returntrue
, also payment method should satisfy default validators likeuseOnCheckout
,useForCountry
,useForCurrency
,orderTotalMinMax
- some of them can be configured via Admin Panel, some inconfig.xml
for per a payment integration.