MultiSafepay / magento2

MultiSafepay plugin for Magento 2
Open Software License 3.0
18 stars 8 forks source link

The payment method you requested is not available #34

Closed alaaCrocoit closed 2 years ago

alaaCrocoit commented 2 years ago

when i used this query query{ multisafepayCart(cart_id:"kaDTle66fZjHrAjBxUnEA6NB8ep6hR3y"){ available_payment_methods{ title } } } this error show: "The payment method you requested is not available"

alaaCrocoit commented 2 years ago

Magento ver. 2.4.4 and PWA ver:~12.2.0

danielcivit commented 2 years ago

Hello @alaaCrocoit

Thanks for reach us and your report.

Looking forward to hear more from you.

alaaCrocoit commented 2 years ago

please can you tell me more info how can i check if the payment method is enabled

alaaCrocoit commented 2 years ago
Screen Shot 2022-07-04 at 4 24 29 PM Screen Shot 2022-07-04 at 4 29 30 PM

please can you check screen shoots

danielcivit commented 2 years ago

Hello.

It seems the payment methods are enable properly. I have been testing the query you have shared.

I think the multisafepayCart only works when a MultiSafepay payment method has been set using setPaymentMethodOnCart.

Otherwise, for a cart ID, in which the payment method is not set, you can use something like the following to get the available_payment_methods:

query{
    cart(cart_id:"YOUR-CART-ID"){
        available_payment_methods{
            title
        }
    }
}

Once again, thanks for reach us and for your report.

alaaCrocoit commented 2 years ago

Ok, how can i get selected_payment_method . it return empty text

alaaCrocoit commented 2 years ago

query{ multisafepayCart(cart_id:"kaDTle66fZjHrAjBxUnEA6NB8ep6hR3y"){ selected_payment_method{ code } } }

vinodsowdagar commented 2 years ago

Hi @alaaCrocoit ,

This query was only meant for retrieving a cart after you have set the payment method on it. If the cart does not have a MultiSafepay payment method, it will probably return an error. This query was meant for doing operations which only should be executed if the customer paid with MultiSafepay, for example, to show a different success page.

If you would like to retrieve the cart before the payment method has been set, please refer to the original cart query from Magento: https://devdocs.magento.com/guides/v2.4/graphql/queries/cart.html

Since this does not seem to be an actual issue related with the module itself and more a question about how a specific query should work, i am closing this issue.

I hope everything is clear now. If you have more questions related to this topic, please send us an e-mail at integration@multisafepay.com and my colleagues from the integration team will help you further.