Closed alaaCrocoit closed 2 years ago
Magento ver. 2.4.4 and PWA ver:~12.2.0
Hello @alaaCrocoit
Thanks for reach us and your report.
Looking forward to hear more from you.
please can you tell me more info how can i check if the payment method is enabled
please can you check screen shoots
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.
Ok, how can i get selected_payment_method . it return empty text
query{ multisafepayCart(cart_id:"kaDTle66fZjHrAjBxUnEA6NB8ep6hR3y"){ selected_payment_method{ code } } }
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.
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"