37 lines
No EOL
12 KiB
XML
37 lines
No EOL
12 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="659px" preserveAspectRatio="none" style="width:542px;height:659px;background:#FFFFFF;" version="1.1" viewBox="0 0 542 659" width="542px" zoomAndPan="magnify"><defs><filter height="300%" id="f6oo5rsk59mkw" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#f6oo5rsk59mkw)" height="248.4395" style="stroke:#000000;stroke-width:2.0;" width="515" x="10" y="207.4199"/><rect fill="#FFFFFF" filter="url(#f6oo5rsk59mkw)" height="103.8867" style="stroke:#000000;stroke-width:2.0;" width="319.5" x="195.5" y="344.9727"/><rect fill="#FFFFFF" height="14.9551" style="stroke:none;stroke-width:1.0;" width="319.5" x="195.5" y="433.9043"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="49" x2="49" y1="88.4883" y2="574.791"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="111" x2="111" y1="88.4883" y2="574.791"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="270.5" x2="270.5" y1="88.4883" y2="574.791"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="472" x2="472" y1="88.4883" y2="574.791"/><rect fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="54" x="20" y="53"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="27" y="73.5352">Stripe</text><rect fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="54" x="20" y="573.791"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="27" y="594.3262">Stripe</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="88" y="85.5352">Client</text><ellipse cx="111" cy="15" fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" rx="8" ry="8" style="stroke:#A80036;stroke-width:2.0;"/><path d="M111,23 L111,50 M98,31 L124,31 M111,50 L98,65 M111,50 L124,65 " fill="none" filter="url(#f6oo5rsk59mkw)" style="stroke:#A80036;stroke-width:2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="88" y="587.3262">Client</text><ellipse cx="111" cy="600.2793" fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" rx="8" ry="8" style="stroke:#A80036;stroke-width:2.0;"/><path d="M111,608.2793 L111,635.2793 M98,616.2793 L124,616.2793 M111,635.2793 L98,650.2793 M111,635.2793 L124,650.2793 " fill="none" filter="url(#f6oo5rsk59mkw)" style="stroke:#A80036;stroke-width:2.0;"/><rect fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="127" x="205.5" y="53"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="113" x="212.5" y="73.5352">stripe-payments</text><rect fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="127" x="205.5" y="573.791"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="113" x="212.5" y="594.3262">stripe-payments</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="439" y="85.5352">Tracking</text><path d="M454,36 C454,26 472,26 472,26 C472,26 490,26 490,36 L490,62 C490,72 472,72 472,72 C472,72 454,72 454,62 L454,36 " fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" style="stroke:#000000;stroke-width:1.5;"/><path d="M454,36 C454,46 472,46 472,46 C472,46 490,46 490,36 " fill="none" style="stroke:#000000;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="439" y="587.3262">Tracking</text><path d="M454,600.2793 C454,590.2793 472,590.2793 472,590.2793 C472,590.2793 490,590.2793 490,600.2793 L490,626.2793 C490,636.2793 472,636.2793 472,636.2793 C472,636.2793 454,636.2793 454,626.2793 L454,600.2793 " fill="#FEFECE" filter="url(#f6oo5rsk59mkw)" style="stroke:#000000;stroke-width:1.5;"/><path d="M454,600.2793 C454,610.2793 472,610.2793 472,610.2793 C472,610.2793 490,610.2793 490,600.2793 " fill="none" style="stroke:#000000;stroke-width:1.5;"/><rect fill="#EEEEEE" filter="url(#f6oo5rsk59mkw)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="535" x="0" y="119.1436"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="535" y1="119.1436" y2="119.1436"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="535" y1="122.1436" y2="122.1436"/><rect fill="#EEEEEE" filter="url(#f6oo5rsk59mkw)" height="23.3105" style="stroke:#000000;stroke-width:2.0;" width="153" x="191" y="108.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="135" x="197" y="125.0566">Payment succeeded</text><polygon fill="#A80036" points="259,159.1094,269,163.1094,259,167.1094,263,163.1094" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="49" x2="265" y1="163.1094" y2="163.1094"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="168" x="56" y="158.3672">payment_intent.succeeded</text><polygon fill="#A80036" points="460,188.4199,470,192.4199,460,196.4199,464,192.4199" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="271" x2="466" y1="192.4199" y2="192.4199"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="278" y="187.6777">Store event</text><path d="M10,207.4199 L72,207.4199 L72,214.4199 L62,224.4199 L10,224.4199 L10,207.4199 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="248.4395" style="stroke:#000000;stroke-width:2.0;" width="515" x="10" y="207.4199"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="25" y="220.9883">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="172" x="87" y="220.0547">[Event not previously handled]</text><polygon fill="#A80036" points="460,242.041,470,246.041,460,250.041,464,246.041" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="271" x2="466" y1="246.041" y2="246.041"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="177" x="278" y="241.2988">Mark payment as succeeded</text><polygon fill="#A80036" points="60,271.3516,50,275.3516,60,279.3516,56,275.3516" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="54" x2="270" y1="275.3516" y2="275.3516"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="100" x="66" y="270.6094">Look up invoice</text><path d="M147,288.3516 L147,328.3516 L390,328.3516 L390,298.3516 L380,288.3516 L147,288.3516 " fill="#FBFB77" filter="url(#f6oo5rsk59mkw)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M380,288.3516 L380,298.3516 L390,298.3516 L380,288.3516 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="183" x="153" y="305.9199">Recurring if an invoice exists</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="222" x="153" y="321.2305">and has an associated subscription</text><path d="M195.5,344.9727 L257.5,344.9727 L257.5,351.9727 L247.5,361.9727 L195.5,361.9727 L195.5,344.9727 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="103.8867" style="stroke:#000000;stroke-width:2.0;" width="319.5" x="195.5" y="344.9727"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="210.5" y="358.541">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="89" x="272.5" y="357.6074">[Non-recurring]</text><line style="stroke:#A80036;stroke-width:1.0;" x1="271" x2="313" y1="383.5938" y2="383.5938"/><line style="stroke:#A80036;stroke-width:1.0;" x1="313" x2="313" y1="383.5938" y2="396.5938"/><line style="stroke:#A80036;stroke-width:1.0;" x1="272" x2="313" y1="396.5938" y2="396.5938"/><polygon fill="#A80036" points="282,392.5938,272,396.5938,282,400.5938,278,396.5938" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="97" x="278" y="378.8516">Fulfill purchase</text><polygon fill="#A80036" points="460,421.9043,470,425.9043,460,429.9043,464,425.9043" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="271" x2="466" y1="425.9043" y2="425.9043"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="163" x="278" y="421.1621">Mark purchase as fulfilled</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="195.5" x2="515" y1="434.9043" y2="434.9043"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="63" x="200.5" y="445.5391">[Recurring]</text><rect fill="#EEEEEE" filter="url(#f6oo5rsk59mkw)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="535" x="0" y="483.5146"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="535" y1="483.5146" y2="483.5146"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="535" y1="486.5146" y2="486.5146"/><rect fill="#EEEEEE" filter="url(#f6oo5rsk59mkw)" height="23.3105" style="stroke:#000000;stroke-width:2.0;" width="119" x="208" y="472.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="101" x="214" y="489.4277">Payment failed</text><polygon fill="#A80036" points="259,523.4805,269,527.4805,259,531.4805,263,527.4805" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="49" x2="265" y1="527.4805" y2="527.4805"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="198" x="56" y="522.7383">payment_intent.payment_failed</text><polygon fill="#A80036" points="460,552.791,470,556.791,460,560.791,464,556.791" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="271" x2="466" y1="556.791" y2="556.791"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="278" y="552.0488">Store event</text><!--MD5=[93471d60abc2401e8345787767971b45]
|
|
@startuml
|
|
participant Stripe
|
|
actor Client
|
|
participant "stripe-payments" as Backend
|
|
database Tracking
|
|
|
|
== Payment succeeded ==
|
|
Stripe - -> Backend : payment_intent.succeeded
|
|
Backend -> Tracking : <font color="green">Store event</font>
|
|
alt Event not previously handled
|
|
Backend -> Tracking : <font color="blue">Mark payment as succeeded</font>
|
|
Backend -> Stripe : Look up invoice
|
|
|
|
note over Backend
|
|
Recurring if an invoice exists
|
|
and has an associated subscription
|
|
end note
|
|
alt Non-recurring
|
|
Backend -> Backend : Fulfill purchase
|
|
Backend -> Tracking : <font color="blue">Mark purchase as fulfilled</font>
|
|
else Recurring
|
|
end
|
|
end
|
|
== Payment failed ==
|
|
Stripe - -> Backend : payment_intent.payment_failed
|
|
Backend -> Tracking : <font color="green">Store event</font>
|
|
@enduml
|
|
|
|
PlantUML version 1.2021.10(Mon Aug 30 09:43:48 EDT 2021)
|
|
(GPL source distribution)
|
|
Java Runtime: Java(TM) SE Runtime Environment
|
|
JVM: Java HotSpot(TM) 64-Bit Server VM
|
|
Default Encoding: UTF-8
|
|
Language: en
|
|
Country: US
|
|
--></g></svg> |