However, there is no overview of 'orders' in the Rabo Smart Pay dashboard, only transactions. The omnikassaOrderId cannot be found at all in the Rabo Smart Pay dashboard. This makes it confusing that we do store and display it as a transaction ID.
Currently we also use the \get_pronamic_payment_by_transaction_id( $omnikassa_order_id ) to find the Pronamic Pay payment:
[x] No longer store omnikassaOrderId as the Pronamic Pay payment transaction ID.
[x] Store the omnikassaOrderId in the payment via wp_posts.post_name so that we can query the Pronamic Pay payment much faster. The implementation of get_pronamic_payment_by_transaction_id involves a heavy meta query:
When starting a Rabo Smart Pay payment, we use the
https://betalen.rabobank.nl/omnikassa-api/order/server/api/v2/order
endpoint: https://developer.rabobank.nl/product/9981/api/9770#/RaboSmartPayOnlinePaymentAPI_1013/operation/%2Forder%2Fserver%2Fapi%2Fv2%2Forder/postWe receive an
omnikassaOrderId
in the response:We save this
omnikassaOrderId
as transaction ID in the Pronamic payment:https://github.com/pronamic/wp-pronamic-pay-omnikassa-2/blob/d09ad0e964f907625e11d66dd227a92299da092e/src/Gateway.php#L422-L426
However, there is no overview of 'orders' in the Rabo Smart Pay dashboard, only transactions. The
omnikassaOrderId
cannot be found at all in the Rabo Smart Pay dashboard. This makes it confusing that we do store and display it as a transaction ID.Currently we also use the
\get_pronamic_payment_by_transaction_id( $omnikassa_order_id )
to find the Pronamic Pay payment:https://github.com/pronamic/wp-pronamic-pay-omnikassa-2/blob/d09ad0e964f907625e11d66dd227a92299da092e/src/Gateway.php#L557-L575
When requesting order status changes after a webhook call from the Rabo Smart Pay, it is possible to get the transactions of an order returned with the new
v2
API: https://betalen.rabobank.nl/omnikassa-api/order/server/api/v2/events/results/merchant.order.status.changedWe currently use the following API endpoint: https://developer.rabobank.nl/product/9981/api/9770#/RaboSmartPayOnlinePaymentAPI_1013/operation/%2Forder%2Fserver%2Fapi%2Fevents%2Fresults%2Fmerchant.order.status.changed/get
https://github.com/pronamic/wp-pronamic-pay-omnikassa-2/blob/d09ad0e964f907625e11d66dd227a92299da092e/src/Client.php#L272-L286
I suggest we do the following things:
omnikassaOrderId
as the Pronamic Pay payment transaction ID.omnikassaOrderId
in the payment viawp_posts.post_name
so that we can query the Pronamic Pay payment much faster. The implementation ofget_pronamic_payment_by_transaction_id
involves a heavy meta query:"orderStatus": "COMPLETED"
store first"transactionStatus": "SUCCESS"
transaction ID in the Pronamic Pay payment."orderStatus": "X"
store first"transactionStatus": "Y"
transaction ID in the Pronamic Pay payment.The following 4 transactions are all for the same Rabo Smart Pay order:
5db65e5a-be4b-414b-9f2f-f3ade91609c0
95d329fe-2999-4e95-b7cb-2ef992d224ef
5ed46c09-13d3-4f93-9965-115d4f537a3a
71bb15d1-34ad-4669-bf83-da4b2f970598
3d42c332-befc-427b-96fb-26b39f15ff61
Internal HelpScout ticket: https://secure.helpscout.net/conversation/2310345880/25945/