Zen Cart Logo
Forums / Addon Payment Modules / Stripe.com payment integration module

Stripe.com payment integration module

Views: 233,161

Results 501 to 520 of 679
8 Jan 2025, 1:22 AM
#501
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Stripe.com payment integration module

split63:

According to Stripe:

*To automatically expire unused Checkout Sessions, you can set the expires_at parameter when creating a Checkout Session. This parameter determines the expiration time of the session and can be set to any time between 30 minutes and 24 hours after the session is created. Once a Checkout Session reaches its expiration time without completion, it becomes inaccessible

The default expiration time for Stripe Checkout Sessions is 24 hours*

Perhaps the easy fix is to set this parameter to just less than whatever the session time out is for Zen?
I don't see where it is ever set in the stripe code

Zen Cart's session timeout is 1440 seconds by default. This is 24 minutes.
Stripe's timeout is between 30 minutes and 24 hours, so the same issue will occur during these 6 minutes.
For this reason, the tpl_checkout_comfirm########.php script is set up to redirect to the time_out page as soon as the Zen Cart session timeout occurs.
If you want to set it on the Stripe side, you can insert "expires_at:" and the timeout time line 37 of checkout.js. (I haven't check this though)

$timeoutURL is Zen cart session time

8 Jan 2025, 1:26 AM
#502
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

Sorry
$timeoutURL is not Zen cart session expired time.
$SESS_LIFE is Zen cart session expired time.

10 Jan 2025, 9:23 PM
#503
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

Gozzandes:

I've uploaded stripe module ver 219 to github.com.
You can download following link.
Link of Previous message is different.

stripe module 219 for zen cart

When you upgrade your module, overwrite following 4 files and add jscript_stripe.php.
\includes\checkout.js
\includes\modules\payment\stripe.php
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_one_confirmation_defaul t.php

\includes\modules\pages\checkout_payment\jscript_stripe.php

I recommend
The module should be test using local computer with Xampp before uploading to live site.

Nihon yokane corporation

Hi Gozzandes, I have performed this procedure... I am in TEST MODE... have the proper test credentials configured in the module's admin section (admin login area of Zen Cart install)... still have no feilds to enter CC info at Step 2 of 3... or at Step 3 of 3.
It's the same as before and simply states "Payment Type: Credit Card" and nothing more.
Should I FTP the entire 2.1.9 module and simply have it "overwrite" any and all duplicate files? Perhaps this will fix the issue?

Here is a "Debug Log" that was generated after I tried this test order FWIW..

[10-Jan-2025 21:13:56 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.26.5, Language id 1
#1 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
#2 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
#3 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
--> PHP Warning: Undefined array key "paymentIntent" in /includes/modules/payment/stripe.php on line 169.

Attachment 20857

10 Jan 2025, 11:07 PM
#504
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=BigB;1405241]Hi Gozzandes, I have performed this procedure... I am in TEST MODE... have the proper test credentials configured in the module's admin section (admin login area of Zen Cart install)... still have no feilds to enter CC info at Step 2 of 3... or at Step 3 of 3.
It's the same as before and simply states "Payment Type: Credit Card" and nothing more.
Should I FTP the entire 2.1.9 module and simply have it "overwrite" any and all duplicate files? Perhaps this will fix the issue?

Here is a "Debug Log" that was generated after I tried this test order FWIW..

[10-Jan-2025 21:13:56 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.26.5, Language id 1
#1 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
#2 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
#3 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
--> PHP Warning: Undefined array key "paymentIntent" in /includes/modules/payment/stripe.php on line 169.

Here's an up close pic of what I mean.... I don't get any feilds to enter CC info...
Attachment 20859

11 Jan 2025, 11:47 AM
#505
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=BigB;1405244]> BigB:

Hi Gozzandes, I have performed this procedure... I am in TEST MODE... have the proper test credentials configured in the module's admin section (admin login area of Zen Cart install)... still have no feilds to enter CC info at Step 2 of 3... or at Step 3 of 3.
It's the same as before and simply states "Payment Type: Credit Card" and nothing more.
Should I FTP the entire 2.1.9 module and simply have it "overwrite" any and all duplicate files? Perhaps this will fix the issue?

Here is a "Debug Log" that was generated after I tried this test order FWIW..

[10-Jan-2025 21:13:56 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.26.5, Language id 1
#1 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
#2 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
#3 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
--> PHP Warning: Undefined array key "paymentIntent" in /includes/modules/payment/stripe.php on line 169.

Here's an up close pic of what I mean.... I don't get any feilds to enter CC info...
Attachment 20859

Copy the following files.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_one_confirmation_defaul t.php

and paste/overwrite it to
\includes\templates\responsive_classic\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\responsive_classic\templates\tpl_checkout_one_confirmation_defaul t.php

11 Jan 2025, 5:29 PM
#506
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=Gozzandes;1405246]> BigB:

Copy the following files.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_one_confirmation_defaul t.php

and paste/overwrite it to
\includes\templates\responsive_classic\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\responsive_classic\templates\tpl_checkout_one_confirmation_defaul t.php

OK... will give it a go. Thank you

11 Jan 2025, 7:59 PM
#507
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=Gozzandes;1405246]> BigB:

Copy the following files.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_one_confirmation_defaul t.php

and paste/overwrite it to
\includes\templates\responsive_classic\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\responsive_classic\templates\tpl_checkout_one_confirmation_defaul t.php

This seems to have worked. Now the fields show to enter the faux CC info. I did a test order and everything was showing as it should. Thank you very much for helping. Greatly appreciated :bigups:

I did get this in a Debug Log after doing the test order... not sure if it's a big problem or not:

[11-Jan-2025 19:37:38 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.26.5, Language id 1
#1 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
#2 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
#3 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
--> PHP Warning: Undefined array key "paymentIntent" in /includes/modules/payment/stripe.php on line 169.

11 Jan 2025, 8:10 PM
#508
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: Stripe.com payment integration module

Zen: 1.5.7c

I had to disable Stripe.
Not sure what happened, many stripe payments with no Zen order. And one Triplicate order

I have numbered the failed orders below. Here is the feedback from the customers for each

1. Order changed from $98.94 to $102.24; changed shipping method. notification from cash app for the charge but after I submitted the order it just took me back to the main page
2. Selected Cash App pay, clicked confirm order, says the payment went through, but the items I selected were still in my cart and there was a button saying “confirm order”
3. I remember seeing it pop up on my phone as a charge to my account so I assumed it went thru.
4. No feedback yet

Attachment 20860

11 Jan 2025, 8:35 PM
#509
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=Gozzandes;1405246]> BigB:

Copy the following files.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_one_confirmation_defaul t.php

and paste/overwrite it to
\includes\templates\responsive_classic\templates\tpl_checkout_confirmation_default.ph p
\includes\templates\responsive_classic\templates\tpl_checkout_one_confirmation_defaul t.php

[QUOTE=BigB;1405256]> Gozzandes:

This seems to have worked. Now the fields show to enter the faux CC info. I did a test order and everything was showing as it should. Thank you very much for helping. Greatly appreciated :bigups:

I did get this in a Debug Log after doing the test order... not sure if it's a big problem or not:

[11-Jan-2025 19:37:38 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.26.5, Language id 1
#1 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
#2 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
#3 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
--> PHP Warning: Undefined array key "paymentIntent" in /includes/modules/payment/stripe.php on line 169.

I have noticed that on the two test orders I have tried that the payments show as "Pending"... I'm offering digital download products and there is a message that states "NOTE: Downloads are not available until payment has been confirmed".
I would think that payments would be "confirmed" while using test mode but, I don't know for certain. Perhaps there is a setting I need to configure or maybe the Debug Log is pointing to this issue? Any insight or suggestions is greatly appreciated, thanks

12 Jan 2025, 12:30 AM
#510
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: Stripe.com payment integration module

#4 just provided this info:

"I kept getting redirected back to the cart after I selected the Amazon Pay without receiving any notice at all. there was no information about if the order payment was denied or anything else.
So, after 2 Amazon attempts, I decided to try my credit card, and I was able to complete the order."

Its as if something changed at Stripe and now Payments other than credit cards, fail to create an order in Zen

12 Jan 2025, 8:19 AM
#511
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=BigB;1405258][QUOTE=Gozzandes;1405246]

BigB:

I have noticed that on the two test orders I have tried that the payments show as "Pending"... I'm offering digital download products and there is a message that states "NOTE: Downloads are not available until payment has been confirmed".
I would think that payments would be "confirmed" while using test mode but, I don't know for certain. Perhaps there is a setting I need to configure or maybe the Debug Log is pointing to this issue? Any insight or suggestions is greatly appreciated, thanks

Following 2 files should be changed
www\includes\modules\pages\checkout_one\jscript_stripe.php
\www\includes\modules\pages\checkout_payment\jscript_stripe.php

from

<?php 
if ( isset($_SESSION['paymentIntent'])){
    $_SESSION['paymentIntent'] = '';
  }
?>

to

<?php 
    $_SESSION['paymentIntent'] = '';
?>

could you check it and reply?

12 Jan 2025, 8:44 AM
#512
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

split63:

#4 just provided this info:

"I kept getting redirected back to the cart after I selected the Amazon Pay without receiving any notice at all. there was no information about if the order payment was denied or anything else.
So, after 2 Amazon attempts, I decided to try my credit card, and I was able to complete the order."

Its as if something changed at Stripe and now Payments other than credit cards, fail to create an order in Zen

When Zen cart session end and Stripe session sill alive.
Stripe payment:Pass
Zen cart: Not pass

When Stripe session end and Zen cart session still alive.
Stripe payment:Not Pass
Zen cart: pass

Even if Zen cart session ended and Stripe session also ended, Stripe "Confirm button" displayed.
and the customers redirect to the front page after pushing the button.

You can check your Zen cart session time in inculdes/functions/sessions.php
line15-31
$SESS_LIFE

Did you rewrite following codes to bottom of the tpl_checkout _confirmation_default.php?

<!--------stripe-------->

<?php
$jason_stripe_select = json_encode($stripe_select);
$jason_sess_life = json_encode($SESS_LIFE);
$timeoutURL = '"' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=time_out"';
?>
<script>

var stripe_select = JSON.parse('<?php echo $jason_stripe_select; ?>'); 
var sess_life = JSON.parse('<?php echo $jason_sess_life; ?>'); 
var timeoutURL = JSON.parse('<?php echo $timeoutURL; ?>'); 

if (stripe_select === "True") {

    document.getElementById('btn_submit').style.display ="none";
    document.getElementById('checkout_confirmation').style.display ="none";
    document.getElementById('payment-form','submit').display ="block";
    setTimeout(function(){window.location.href = timeoutURL;}, sess_life*1000);


  }else{
    document.getElementById('btn_submit').display ="block";
    document.getElementById('checkout_confirmation').display ="block";
    document.getElementById('payment-form','submit').style.display ="none";

  }

</script>
<!--------end-stripe-------->
12 Jan 2025, 3:11 PM
#513
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: Stripe.com payment integration module

Gozzandes:

Did you rewrite following codes to bottom of the tpl_checkout _confirmation_default.php?

The stripe module is the 2.1.9 release, no changes. This module was essentially working until Jan 10th, then all non credit card payments there after failed to create a Zen Order.
I had not messed with the session issue yet.

inculdes/functions/sessions.php should be that from 1.5.7c unaltered:

if (IS_ADMIN_FLAG === true) {
    $SESS_LIFE = (int)SESSION_TIMEOUT_ADMIN;
    // if strict is enabled, must be a max of 900
    if (PADSS_ADMIN_SESSION_TIMEOUT_ENFORCED != 0 && $SESS_LIFE > 900) {
        $SESS_LIFE = 900;
    }
} else {
    // read PHP config
    $SESS_LIFE = get_cfg_var('session.gc_maxlifetime');
    // override if set
    if (defined('SESSION_TIMEOUT_CATALOG') && (int)SESSION_TIMEOUT_CATALOG > 120) {
        $SESS_LIFE = (int)SESSION_TIMEOUT_CATALOG;
    }
    // if set toooo short, reset to default
    if ((int)$SESS_LIFE < 120) {
        $SESS_LIFE = 1440;

This is the code at the bottom of /responsive_classic/templates/tpl_checkout_confirmation_default.php

<!--------stripe-------->

<?php
$jason_stripe_select = json_encode($stripe_select);
?>
<script>

var stripe_select = JSON.parse('<?php echo $jason_stripe_select; ?>'); 
if (stripe_select === "True") {
    document.getElementById('btn_submit').style.display ="none";
    document.getElementById('checkout_confirmation').style.display ="none";
    document.getElementById('payment-form','submit').display ="block";
  }else{
    document.getElementById('btn_submit').display ="block";
    document.getElementById('checkout_confirmation').display ="block";
    document.getElementById('payment-form','submit').style.display ="none";

  }
</script>
<!--------end-stripe-------->  
12 Jan 2025, 5:44 PM
#514
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=Gozzandes;1405263][QUOTE=BigB;1405258]> Gozzandes:

Following 2 files should be changed
www\includes\modules\pages\checkout_one\jscript_stripe.php
\www\includes\modules\pages\checkout_payment\jscript_stripe.php

from

<?php if ( isset($_SESSION['paymentIntent'])){ $_SESSION['paymentIntent'] = ''; } ?>
> 
> to
> ```php
<?php 
    $_SESSION['paymentIntent'] = '';
?>

could you check it and reply?

Ok, I will give it a try and post results when done. Thank you

12 Jan 2025, 6:27 PM
#515
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=Gozzandes;1405263][QUOTE=BigB;1405258]> Gozzandes:

Following 2 files should be changed
www\includes\modules\pages\checkout_one\jscript_stripe.php
\www\includes\modules\pages\checkout_payment\jscript_stripe.php

from

<?php if ( isset($_SESSION['paymentIntent'])){ $_SESSION['paymentIntent'] = ''; } ?>
> 
> to
> ```php
<?php 
    $_SESSION['paymentIntent'] = '';
?>

could you check it and reply?

Ok, I was able to change the php file for \www\includes\modules\pages\checkout_payment\jscript_stripe.php
However, I do not have a folder for www\includes\modules\pages\checkout_one
with a jscript_stripe.php file for me to modify.
Is this a folder with files I need to FTP over into my ZC installation?

I did try a test order all the same after making the modifuaction in \www\includes\modules\pages\checkout_payment\jscript_stripe.php
and still get the same message "NOTE: Downloads are not available until payment has been confirmed"
Attachment 20861

13 Jan 2025, 1:50 AM
#516
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=BigB;1405272][QUOTE=Gozzandes;1405263]> BigB:

Ok, I was able to change the php file for \www\includes\modules\pages\checkout_payment\jscript_stripe.php
However, I do not have a folder for www\includes\modules\pages\checkout_one
with a jscript_stripe.php file for me to modify.
Is this a folder with files I need to FTP over into my ZC installation?

I did try a test order all the same after making the modifuaction in \www\includes\modules\pages\checkout_payment\jscript_stripe.php
and still get the same message "NOTE: Downloads are not available until payment has been confirmed"
Attachment 20861

download ver 2.1.11and overwrite all files.

13 Jan 2025, 2:19 AM
#517
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

[QUOTE=Gozzandes;1405275][QUOTE=BigB;1405272]> Gozzandes:

download ver 2.1.11and overwrite all files.

OK, I downloaded version 2.1.11... I'll give it a go. Thank you

13 Jan 2025, 2:55 AM
#518
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

you should change the status.

13 Jan 2025, 3:07 AM
#519
gozzandes avatar

gozzandes

Zen Follower

Join Date:
Jul 2021
Location:
Fukuoka Japan
Posts:
131
Plugin Contributions:
0

Re: Stripe.com payment integration module

You should change the status after cheking the payment in the admin page.
or change the default order value of setting.

13 Jan 2025, 3:37 AM
#520
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Stripe.com payment integration module

Gozzandes:

You should change the status after cheking the payment in the admin page.
or change the default order value of setting.

OK... Right now all test orders are "pending". Not sure what they should be changed to... the other choices are* processing, delivered* or update.
Should this be done before I update the stripe module to version 2.1.11 or after I update the module?