PAYONE-GmbH / magento-1

PAYONE Payment Extension for Magento 1
22 stars 41 forks source link

Create Order With PAYONE Payment Method via SOAP API #401

Closed sprankhub closed 1 month ago

sprankhub commented 4 years ago

My client implements an app. The payment is processed via the PAYONE API directly. Afterwards, an order is created via the Magento SOAP API. The issue is, that this is currently not possible. If one uses payone_creditcard as a payment method identifier in the API, there is an error that the payone_config_payment_method_id is not set. However, this cannot be set, because it is not defined in the shoppingCartPaymentMethodEntity (see https://github.com/OpenMage/magento-mirror/blob/af2c70ff9f4fec9373595689d48180b3808893cc/app/code/core/Mage/Checkout/etc/wsdl.xml#L305-L316). Even if one adds it, PAYONE expects a cardexpiredate (and probably more). Is there any documentation available how an order can be created via the Magento API when using a PAYONE payment method?

fjbender commented 4 years ago

I'm afraid creating orders through the API was never really in scope of the extension. I guess one would have to hack the module a bit to accept just a TXID and maybe a payment type at the API instead of the normally required parameters.

sprankhub commented 4 years ago

I feared that you would say that :-)

TBH, I think it would be beneficial to add all PAYONE-related data, so that the transaction statuses are processed correctly. Otherwise, they would all fail. Do you think it would be enough to fill all PAYONE-related fields in sales_flat_order_payment, so that the transaction statuses are processed correctly? Or is more data necessary for that?

fjbender commented 4 years ago

I'm afraid it's not that easy. It seems to me that at least an entry in payone_transaction is needed as well.

sprankhub commented 4 years ago

I see. Well then there should probably be an API endpoint provided by this extension, which allows adding entries to payone_transaction? ;-) Do you think this is something worth adding?

Do you see more required data besides the PAYONE-related fields in sales_flat_order_payment and maybe sales_flat_order_payment (?) and the entry in payone_transaction?

fjbender commented 4 years ago

There should be, and it's probably worth adding from a dev perspective, but it'll be difficult to allocate any resources to that from our side, as more and more merchants are leaving Magento 1 and this never was a use case we really supported.

I can't find any more required data at a glimpse, so you should be fine. But one can only be sure during testing, I suppose.