Skip to content

Instantly share code, notes, and snippets.

@Mo33n
Last active December 4, 2020 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mo33n/7d87ac1c6cbe994cb54f72384ce43de0 to your computer and use it in GitHub Desktop.
Save Mo33n/7d87ac1c6cbe994cb54f72384ce43de0 to your computer and use it in GitHub Desktop.
title ID Improved Payment Flow
actor CX
CX->App:Open App
App->BaaS:Purchase Request
BaaS->BaaS:Save intend & generate uuid
BaaS->App:WebFront URL with uuid
WebFront->App:Fetch URL by UUID
App->App:Select payment option
App->+PaaS:Fetch payment Page
PaaS->PaaS :Create transaction based for UUID
PG->PaaS:Fetch payment Page
PaaS->-App:Payment page
App->App:Preform Payment
alt Successful Payment
PG->PaaS:Payment Success Callback
PaaS->PaaS:Update/Close transaction
PaaS->+BaaS:Send Payment Response (RMQ)
BaaS->BaaS:Fetch Payment Intend
BaaS->BaaS:Create Transction
BaaS->BRM:Apply Addon/BasePlan
BaaS->-NNS:Send Notification
BaaS->BaaS:Close Transaction
else Non-Susseccful Payment
alt Retry
App->+PaaS:Fetch payment Page
PaaS->PaaS :Create NEW transaction based for UUID
PG->PaaS:Fetch payment Page
PaaS->-App:Payment page
else No Retry
PG->PaaS: Payment Page Expire event
opt Ack BaaS
PaaS-->BaaS: Close Intend/Failed Payment
end
end
end
@Mo33n
Copy link
Author

Mo33n commented Dec 4, 2020

Updated Version

title ID Improved Payment Flow
actor CX
CX->App:Open App
App->BaaS:Purchase Request
BaaS->BaaS:Save intend & generate uuid
BaaS->App:WebFront URL with uuid
WebFront->App:Fetch URL by UUID
App->App:Select payment option
App->+PaaS:Fetch payment Page
PaaS->PaaS :Create transaction based for UUID
PG->PaaS:Fetch payment Page
PaaS->-App:Payment page
App->App:Preform Payment

alt Successful Payment
PG->PaaS:Payment Success Callback
PaaS->PaaS:Update/Close transaction
PaaS->+BaaS:Send Payment Response (RMQ)
BaaS->BaaS:Fetch Payment Intend
BaaS->BaaS:Create Transction
BaaS->BRM:Apply Addon/BasePlan
BaaS->-NNS:Send Notification
BaaS->BaaS:Close Transaction
else Non-Susseccful Payment
alt Retry
App->+PaaS:Fetch payment Page
PaaS->PaaS :Create NEW transaction based for UUID
PG->PaaS:Fetch payment Page
PaaS->-App:Payment page
else No Retry
PG->PaaS: Payment Page Expire event
opt Ack BaaS
PaaS-->BaaS: Close Intend/Failed Payment
end
end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment