Skip to content

Commit

Permalink
Merge branch 'dp' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed Nov 23, 2023
2 parents 2dbc1a2 + 5a8613f commit 33fed0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http_svr/handle/payment_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (h *HttpHandle) doPaymentInfo(req *ReqPaymentInfo, apiResp *http_api.ApiRes
RefundStatus: v.RefundStatus,
}
if v.PayTokenId == tables.PayTokenIdStripeUSD {
if pi, err := stripe_api.GetPaymentIntent(v.PayHash); err == nil {
if pi, err := stripe_api.GetPaymentIntent(v.PayHash); err == nil && pi.PaymentMethod != nil {
if pm, err := stripe_api.GetPaymentMethod(pi.PaymentMethod.ID); err == nil {
tmp.SourcePayment = fmt.Sprintf("%s %s", pm.Card.Brand, pm.Card.Last4)
}
Expand Down

0 comments on commit 33fed0d

Please sign in to comment.