File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Resources/src/components/balance Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ onMounted(async () => {
6060 });
6161
6262 if (paypal && paypal .Buttons ) {
63+ let activeSessionIntervalId: NodeJS .Timeout | number ;
6364 paypal
6465 .Buttons ({
6566 onInit : function (_data , actions ) {
@@ -82,7 +83,12 @@ onMounted(async () => {
8283 );
8384 },
8485 createOrder : function (_data , actions ) {
85- checkActiveSession ();
86+ activeSessionIntervalId = setInterval (
87+ () => {
88+ checkActiveSession ();
89+ },
90+ 10 * 60 * 1000
91+ );
8692 return actions .order .create ({
8793 purchase_units: [
8894 {
@@ -99,6 +105,7 @@ onMounted(async () => {
99105 return actions .resolve ();
100106 },
101107 onApprove : async function (data , actions ) {
108+ clearInterval (activeSessionIntervalId );
102109 isLoading .value = true ;
103110 try {
104111 await actions .order ?.capture ();
You can’t perform that action at this time.
0 commit comments