cartasi payment detailed flowchart
2017-04-01 16:26:22 0 举报
payment detailed flowchart
作者其他创作
大纲/内容
NO
SELECT tp FROM SharengoCore\\Entity\\TripPayments tp JOIN tp.trip t WHERE tp.status = :status AND tp.invoice IS NULL AND tp.totalCost != 0 ORDER BY t.timestampBeginning ASC
write log'Done generating invoices'
new CartasiResponse
all trips finished
updateTransactionFromXml : update table transactions
One trip
YES
groupTripPayments(group trip by date and customer)
contractNumber exist ?isExpired ?customerHash ?
update `customers` set payment_able = false and update `trip_payments` set status = 'wrong_payment'
sendPaymentRequest(cartasi/pagamento-ricorrente)
check table customers field 'payment_able'
tryCustomerTripPayment
unpayableConsequences
write log 'Started processing payments'
notifyCustomerPay
prepareInvoiceForTrips
FALSE
findTripPaymentsNoInvoice
first_payment
return JsonModel
update `customers` set payment_able = false and enabled = false
tryPayment
hasCartasiContract
isFirstPaymentTryTsSet
TRUE
verify contract
getCompletedCorrectly
ConsolePayInvoiceController/payInvoiceAction
setFirstPaymentTryTs
return view ('ok' or 'ko')
$dql = 'SELECT tp FROM SharengoCore\\Entity\\TripPayments tp '. 'JOIN tp.trip t '. 'WHERE tp.status = :status '. 'AND t.customer = :customer';
update `payment_script_runs` set end_ts = time()
end
write log 'Started generating invoices'
processPaymentsCompleted(send email to user)
update trip_payments set status = 'payed_correctly and pay_successfully_at' = date_create()
not correctly
generateInvoices
new TripPaymentTries(table trip_payment_tries)
scriptStarted
processpayments
scriptEnded
insert into `payment_script_runs` one data
false
verifyResponse(verifyMac、verifyTransaction)
write log 'Done processing payments'
correctly
0 条评论
下一页