Closed simonmaass closed 4 months ago
This is not supported (yet) - we have it on the roadmap, but I don't have an ETA at this time.
That is very unfortunate as this was the only reason we bought the POS System from mollie... is there any workaround at this time maybe?
The team is looking into it, we might have something for you :)
@fjbender thank you!
Hello @simonmaass , Apologies for the delayed reply here. Could you clarify the specific scenario that you are trying to achieve? Currently, you can display the POS method via the REST API by using a customer within the designated customer group set up in the POS settings. Does this answer your question? Or are you looking for something else?
@Frank-Magmodules thank you for getting back!
We have the following setup: Magento 2.4.6 Instance only used as backend Laravel 10.x application consuming magento rest api to place orders.
The laravel application is a POS software for stationary retail stores that will add products to cart and place the order. After a successful order place the POS software should trigger the mollie POS device the capture the payment.
In the checkout flow of the laravel app we fetch the shipping and payment methods but we are not able to get the payment method mollie_methods_pointofsale from the backend...the payment method is enabled on magento 2 side but is not returned...
You are probably referring to this method: Service\Mollie\PointOfSaleAvailability.php But the laravel POS software will not have an active customer session as the sales staff are using the laravel app
this is the endpoint we currently use to get them: https://xxx/rest/xxx/V1/guest-carts/xxxx/shipping-information
Hmm, maybe it makes sense to alter the Mollie\Payment\Service\Mollie\PointOfSaleAvailability::isAvailable()
portion then. Can we make it configurable (per Sales Channel or something) that POS also works for Guest Checkouts? What do you think @Frank-Magmodules ?
@simonmaass Have you tried (just for the lolz) to override this method to return true
in any case?
Goodmorning @simonmaass ,
It looks like you have 2 options here:
Mollie\Payment\Service\Mollie\PointOfSaleAvailability::isAvailable()
.
This can be done by identifying the sales staff by either user-agent, IP address, session, or something else.@Frank-Magmodules @fjbender thank you for your input!
We have created a plugin and successfully overrode the method... we are now able to fetch the payment method...
When creating an order over the REST Api: PUT https://xxx/rest/xxx/V1/guest-carts/xxx/order we now receive the following error: Error executing API call (422: Unprocessable Entity): No terminal ID specified.
Where can we specifiy this over the rest api? Thank you for your help!
Hello @simonmaass,
At this moment, there is no way to retrieve the terminal ID through the API. We have added that to our backlog. To retrieve an ID, you can create an order through the backend, check what the valid values are, and use that as a hard-coded value in the meantime.
To send the selected terminal in the API requests, you can set it as selected_terminal
in the additional data like you would with selected_issuer
, card_token
or applepay_payment_token
. An example can be found here:
https://github.com/mollie/magento2/blob/master/Test/End-2-end/cypress/fixtures/mollie-pwa-rest.html#L487-L489
@Frank-Magmodules Thank you!
We were able to hard code the terminal id as described by you and are able to place an order via the rest api with pos as payment method with the plugin that overrides the "isAvailable" method...
Hi There @simonmaass ,
We are happy to announce that in our latest release, we address this too. For more information on how to retrieve the available terminals, you can check these pages:
REST - https://github.com/mollie/magento2/wiki/REST-Integration#payment-method-meta GraphQL - https://github.com/mollie/magento2/wiki/GraphQL-integration#retrieve-the-available-payment-methods
Thanks again for your patience and your contribution here @simonmaass !
Describe the bug We are not able to access the payment method "mollie_methods_pointofsale" over the REST Api in magento. We are building a POS software for stationary retail stores and need to access the payment method POS for mollie.
When fetching the payment methods it is not included in the allowed payment methods. Could you maybe push us into the right direction? Thank you so much!