mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 01:55:20 +00:00
CAPI-313: Fix paymentSession swagger crash (#282)
This commit is contained in:
parent
922691ad3c
commit
1f6d7d3ee1
@ -2500,20 +2500,20 @@ decode_stat_payer({payment_resource, PaymentResource}) ->
|
||||
phone_number = PhoneNumber,
|
||||
email = Email
|
||||
} = PaymentResource,
|
||||
#{
|
||||
genlib_map:compact(#{
|
||||
<<"payerType" >> => <<"PaymentResourcePayer">>,
|
||||
<<"paymentToolToken" >> => decode_stat_payment_tool_token(PaymentTool),
|
||||
<<"paymentSession" >> => PaymentSession,
|
||||
<<"paymentToolDetails">> => decode_stat_payment_tool_details(PaymentTool),
|
||||
<<"clientInfo" >> => #{
|
||||
<<"clientInfo" >> => genlib_map:compact(#{
|
||||
<<"ip" >> => IP,
|
||||
<<"fingerprint">> => Fingerprint
|
||||
},
|
||||
}),
|
||||
<<"contactInfo" >> => genlib_map:compact(#{
|
||||
<<"phoneNumber">> => PhoneNumber,
|
||||
<<"email" >> => Email
|
||||
})
|
||||
}.
|
||||
}).
|
||||
|
||||
decode_stat_payment_tool_token(PaymentTool) ->
|
||||
decode_payment_tool_token(merchstat_to_domain(PaymentTool)).
|
||||
|
@ -485,7 +485,8 @@
|
||||
-define(STAT_RESPONSE_PAYMENTS, ?STAT_RESPONSE({payments,
|
||||
[
|
||||
?STAT_PAYMENT(?STAT_PAYER({bank_card, ?STAT_BANK_CARD}), ?STAT_PAYMENT_STATUS_CAPTURED),
|
||||
?STAT_PAYMENT(?STAT_PAYER({bank_card, ?STAT_BANK_CARD_WITH_TP}), ?STAT_PAYMENT_STATUS_PENDING)
|
||||
?STAT_PAYMENT(?STAT_PAYER({bank_card, ?STAT_BANK_CARD_WITH_TP}), ?STAT_PAYMENT_STATUS_PENDING),
|
||||
?STAT_PAYMENT(?STAT_PAYER({bank_card, ?STAT_BANK_CARD}, undefined), ?STAT_PAYMENT_STATUS_CAPTURED)
|
||||
]
|
||||
})).
|
||||
|
||||
@ -531,13 +532,15 @@
|
||||
context = ?CONTENT
|
||||
}).
|
||||
|
||||
-define (STAT_PAYER(PaymentTool), {payment_resource, #merchstat_PaymentResourcePayer{
|
||||
-define (STAT_PAYER(PaymentTool), ?STAT_PAYER(PaymentTool, ?STRING)).
|
||||
|
||||
-define (STAT_PAYER(PaymentTool, SessionId), {payment_resource, #merchstat_PaymentResourcePayer{
|
||||
payment_tool = PaymentTool,
|
||||
ip_address = ?STRING,
|
||||
fingerprint = ?STRING,
|
||||
phone_number = ?STRING,
|
||||
email = <<"test@test.ru">>,
|
||||
session_id = ?STRING
|
||||
session_id = SessionId
|
||||
}}).
|
||||
|
||||
-define(STAT_PAYMENT_STATUS_PENDING, {pending, #merchstat_InvoicePaymentPending{}}).
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d2f447829ba806cc4f6fbb07e35733a8de90a3bb
|
||||
Subproject commit b57ef8a8851a9336b86259caa779dab6454f5d1c
|
Loading…
Reference in New Issue
Block a user