Closed remcotolsma closed 1 year ago
however they are going to move the functionality to the OmniKassa itself
I'd suggest waiting for the OmniKassa functionality, instead of integrating with merchant services.
This seems to be available now:
$url = 'https://betalen.rabobank.nl/omnikassa-api-sandbox/order/server/api/v2/refund/transactions/8b7ed296-929a-408d-96c5-a8ca052f7117/refunds';
$test = wp_remote_post(
$url,
[
'method' => 'POST',
'headers' => [
'Authorization' => 'Bearer ' . $this->config->access_token,
'Request-ID' => '9fd4eb02-84da-11ec-a9f1-973e359e11c9',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'body' => \wp_json_encode(
(object) [
'money' => (object) [
'amount' => 100,
'currency' => 'EUR',
],
'description' => 'Test',
]
),
'timeout' => 30,
]
);
var_dump( $test );
{"refundId":"c131f4c1-40aa-4ac3-92f4-25b144301000","refundTransactionId":"ed276ae0-f54f-4f23-b7c8-4657ad0f28d2","createdAt":"2023-02-06T15:18:44.607Z","updatedAt":null,"vatCategory":"LOW","paymentBrand":"VISA","status":"PENDING","description":"Description","transactionId":"8b7ed296-929a-408d-96c5-a8ca052f7117","refundMoney":{"currency":"EUR","amount":"100"}}
https://wordpress.org/support/topic/returning-payments/#post-14029310
https://wordpress.org/support/topic/returning-payments/#post-14340323
Did some research and found: https://developer.rabobank.nl/reference/omnikassa-merchant-services-api/2-4-0-0.