-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Describe the Issue
Hi team,
We have also seen cases where operator pay-outs may be missed.
In our scenarios - it occurs when we are unable to create an operator transfer request for reasons of: max_daily limit reached (e.g. faster payments limits)
InvoicesExtractBatchJobItemProcessor:
`
/**
- Processes the {@link InvoiceExtractJobItem} with the
- {@link HyperWalletPaymentExtractService}
- @param ctx The {@link BatchJobContext}
- @param jobItem The {@link InvoiceExtractJobItem}
*/
@OverRide
public void processItem(final BatchJobContext ctx, final InvoiceExtractJobItem jobItem) {
hyperWalletPaymentExtractService.payPayeeInvoice(jobItem.getItem());
invoiceProcessService.payOperator(jobItem.getItem());
}
`
You can see that the operator payout is second.
I believe this means that:
If the Payee call succeeds -> a payment/transfer will be created in Hyperwallet. (This is an API call so is not transactional / will not rollback)
If the invoiceProcessService.payOperator(jobItem.getItem()); fails, we will be left in a state of:
Payee transfer has been created (clientReference XXXXX)
Operator payout fails: (clientReference XXXXX-operatorFee)
Hyperwallet will then process the transfer to the Payee and send a Notification (webhook notification back)
The connector will process this and then update Mirakl marking the Invoice as paid.
The issue is that the operator payout will never be received after this point as the connector doesn't retrieve paid invoices.
It then requires a manual workaround to transfer funds back.
Environment
Live/Production
Version
5.2.0
Expected Behavior
Invoices should not get paid if an operator payout does not create in Hyperwallet
(should we reverse the order of the calls for example?)
1 Invoice in Mirakl - is essentially 2 payouts / transfers on the hyperwallet side)
Actual Behavior
Payee is paid and Operator does not get paid / gets missed.
Steps to Reproduce
For a given invoice - ensure that an exception is thrown when creating the operator invoice.
Check that the seller / payee invoice is created
send the notification / payment confirmation for the payee (mirakl invoice number)
observe connector makes the call to confirm the account document in mirakl
see that there is no way to retrieve the operator payout for this invoice / accounting document.
Pre-conditions
No response