Skip to content

Conversation

@pulitta
Copy link
Contributor

@pulitta pulitta commented Dec 5, 2017

No description provided.

@pulitta pulitta requested a review from keynslug December 5, 2017 16:28
@pulitta
Copy link
Contributor Author

pulitta commented Dec 15, 2017

Чтобы компиляция прошла нужно использовать эту версию damsel

-bump damsel;
-GetReceipt added
{mg_proto_state_processing_thrift, 'EventSink'};
get_service(cashreg) ->
{cashreg_proto_processing_thrift, 'CashRegister'};
get_service(cashreg_provider) ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А eventsink как же?

Changes = [
?cashreg_receipt_session_finished(?cashreg_receipt_session_failed({
receipt_registration_failed, #cashreg_main_ReceiptRegistrationFailed{
reason = #cashreg_main_ExternalFailure{code = <<"0">>}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO бы оставить на этот хардкод.

?invoice_payment_flow_instant() ->
?captured();
Status = get_receipt_status(St),
process_receipt_registration(Status, St);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Непонятно, почему только в этом клозе.

end;
merge_change(?receipt_ev(ID, Event, EventID), St) ->
St1 = St#st{activity = {receipt, ID}},
Receipt = make_receipt_state(Event, EventID),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы предложил по образу остальных мест сделать, типа merge_receipt_event/2, и трекать корректно activity.

St1 = set_session(Target, Session, St),
% FIXME leaky transactions
St2 = set_trx(get_session_trx(Session), St1),
St2 = set_trx(get_session_trx(Session), St1#st{activity = payment}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...И по идее вот здесь не придётся мудрить.

[?receipt_ev(ReceiptID, ?receipt_registered(), EventID)];
construct_payment_change(EventID, ReceiptID, ?cashreg_receipt_failed(
{receipt_registration_failed, #cashreg_main_ReceiptRegistrationFailed{
reason = #cashreg_main_ExternalFailure{code = Code, description = Description}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

По идее нужна обёртка.

options = CashRegOptions
}
}) ->
Revision = hg_domain:head(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Опасно. Можно сверху передать?

@keynslug keynslug self-assigned this May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants