-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Привет!
Если я всё правильно понял, то hg себя ведёт некорректно, если рефанд асинхронный, возникают ошибки в хелгейте и машингане и платёж подвисает в состоянии запущен возврат.
Условно, если в адаптере вернуть что-то такое
String paymentId = createPaymentId(context);
String tag = "REFUND." + paymentId;
int timeoutSeconds = 300;
Intent intent = createIntentWithSuspendIntent(tag, timeoutSeconds);
return createPaymentProxyResult(intent);
И затем обработать колбек, то в логах будет:
[server] response sent with code 500
http://hellgate:8022/v1/stateproc/invoice
[server] handling system internal error: error:function_clause
in hg_invoice_payment:get_activity_session({refund_accounter,<<"100">>},{st,{refund_accounter,<<"100">>},{domain_InvoicePayment,<<"1">>,<<"2021-09-"...>>,{captured,...},undefined,...},high,{domain_PaymentRoute,{domain_ProviderRef,...},{...}},...}) at line 3389
in hg_invoice_payment:process_callback/3 at line 1835
in scoper:scope/3 at line 41
in hg_invoice:process_payment_call/4 at line 818
in hg_invoice:process_call/2 at line 572
in hg_machine:do_dispatch_call/3 at line 314
in scoper:scope/3 at line 41
in hg_woody_wrapper:handle_function/4 at line 45
Ну и от MG:
message | machine failed {woody_error,{external,result_unexpected,<<"error:function_clause in hg_invoice_payment:get_activity_session({refund_accounter,<<\"100\">>},{s"...>>}}
-- | --
| mg_pulse_event_id | mg_core_machine_lifecycle_failed
При этом, если адаптер отвечает синхронно, допустим такой код в обработчике, то всё работает как ожидается, платёж переходит в состояние возвращён.
return createPaymentProxyResult(
createFinishIntentSuccess(),
PaymentState.REFUNDED.getBytes(),
context.getPaymentInfo().getRefund().getTrx());
image:
repository: docker.io/rbkmoney/hellgate
tag: efe0b67a7a048bfa17cac871ff2e7b797ea13796
Metadata
Metadata
Assignees
Labels
No labels