Forums / Addon Payment Modules / Stripe.com payment integration module

Stripe.com payment integration module

Views: 234,117

Results 581 to 600 of 680
12 May 2025, 9:47 PM
#581
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
319
Plugin Contributions:
4

Stripe.com payment integration module

Most common problems will be not copying the files correctly, maybe you did not rename "YOUR_TEMPLATE" folder before upload so the payment forms are not actually in your template??

Do you have any error logs you could share, that would help people to pinpoint exactly what you may be missing or have not done.

Did you add stripe to opc in the options you mentioned?

12 May 2025, 10:34 PM
#582
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

Yes, sir. I even downloaded the version from GitHub since it seemed that the version was more up-to-date. I posted the error given before (previous post). All the files are loaded /and reloaded/ within the correct directories. I also did the patch, which was giving me errors before, but I noticed it was because it didn't have the prefix. I thought it was going to be resolved, but I'm getting the same error.

IDEASLady
IDEAS Creative Studio

Your image... our business!

12 May 2025, 11:27 PM
#583
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,970
Plugin Contributions:
8

Re: Stripe.com payment integration module

ideasgirl:

Yes, sir. I even downloaded the version from GitHub since it seemed that the version was more up-to-date. I posted the error given before (previous post). All the files are loaded /and reloaded/ within the correct directories. I also did the patch, which was giving me errors before, but I noticed it was because it didn't have the prefix. I thought it was going to be resolved, but I'm getting the same error.

here is an idea:

  • turn OFF one page checkout
  • try again
  • post the full debug log if you have one
  • if you have no debug logs look at the dev console for any errors there
  • post those errors here.

the last errors i saw said something with CHECKOUT_ONE_LOGIN_LAYOUT. we want to isolate stripe from OPC to see we can get you working with the standard 3 page checkout. once that is working, we can then see why you are failing with OPC.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

13 May 2025, 12:41 AM
#584
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
319
Plugin Contributions:
4

Re: Stripe.com payment integration module

I think I may have an idea of what the issue may be from your most recent response. You downloaded the github version. I believe there are slight nuances that need to be taken into consideration between versions. If you notice I had issues a few pages ago on this very thread with my setup. Admittedly I do not use one page checkout and have extensive customisations to my site responsible for the decision to stick to a 3 page checkout.

I'd say do what Carl says first, if you cannot get running then compare your version against the zencart repository ensuring that you use the correct version for your version of zencart you are working on. Sharing an error log also helps if there is one. ������

13 May 2025, 2:47 PM
#585
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

carlwhat:

here is an idea:

  • turn OFF one page checkout
  • try again
  • post the full debug log if you have one
  • if you have no debug logs look at the dev console for any errors there
  • post those errors here.

the last errors i saw said something with CHECKOUT_ONE_LOGIN_LAYOUT. we want to isolate stripe from OPC to see we can get you working with the standard 3 page checkout. once that is working, we can then see why you are failing with OPC.

best.

Alright, I got it to work with OPC off; which wasn't working previously. With OPC on it doesn't show the input form. These are the errors:

[13-May-2025 10:39:10 America/Puerto_Rico] Request URI: /index.php?main_page=checkout_one_confirmation, IP address: 24.171.194.185, Language id 1
#0 /includes/modules/pages/checkout_one_confirmation/jscript_stripe.php(1): zen_debug_error_handler()
#1 /includes/templates/template_default/common/html_header_js_loader.php(54): require('/home/***/p...')
#2 /includes/templates/abyss_cobalt/common/html_header.php(107): require('/home/***/p...')
#3 /index.php(42): require('/home/***/p...')
--> PHP Warning: Undefined variable $stripe_select in /includes/modules/pages/checkout_one_confirmation/jscript_stripe.php on line 1.
[13-May-2025 10:39:10 America/Puerto_Rico] Request URI: /index.php?main_page=checkout_one_confirmation, IP address: 24.171.194.185, Language id 1
#0 /includes/templates/abyss_cobalt/templates/tpl_checkout_one_confirmation_default.php(238): zen_debug_error_handler()
#1 /includes/templates/abyss_cobalt/common/tpl_main_page.php(181): require('/home/***/p...')
#2 /index.php(94): require('/home/***/p...')
--> PHP Warning: Undefined variable $stripe_select in /includes/templates/abyss_cobalt/templates/tpl_checkout_one_confirmation_default.php on line 238.

But that's obvious because I never got to input the numbers.

IDEASLady
IDEAS Creative Studio

Your image... our business!

13 May 2025, 3:09 PM
#586
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,970
Plugin Contributions:
8

Re: Stripe.com payment integration module

ideasgirl:

...
But that's obvious because I never got to input the numbers.

the only thing that is obvious to me is that the payment module works in standard ZC 3 page checkout and does not work in OPC.

what version of ZC did you say you were running?

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

13 May 2025, 3:19 PM
#587
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

ZC v2.1.0

the only thing that is obvious to me is that the payment module works in standard ZC 3 page checkout

Yes, and that was after making some changes to the Stripe module (it continue giving me issue with the lowfee line but I fixed it).

and does not work in OPC
It doesn't? I thought it did work with OPC since those files were included.

IDEASLady
IDEAS Creative Studio

Your image... our business!

13 May 2025, 3:23 PM
#588
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,970
Plugin Contributions:
8

Re: Stripe.com payment integration module

my guess is that you are running v2.x.x.

my further guess is that you are having a javascript collision, which is preventing some code from running. you can check that by looking at the dev console on your browser.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

13 May 2025, 3:51 PM
#589
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
319
Plugin Contributions:
4

Re: Stripe.com payment integration module

I have seen the undefined strip select issue before.. I would suggest checking your settings and that you have added the opc to stripe like it stated in the instructions. Other possible solutions include swapping files from different versions of the module until you get it working or give up and restore what you originally had and stick with 3 page checkout. I tried 4 versions before I got mine remedied with an issue that resulted in payments but no orders :)

13 May 2025, 4:36 PM
#590
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
319
Plugin Contributions:
4

Re: Stripe.com payment integration module

flappingfish:

I have seen the undefined strip select issue before.. I would suggest checking your settings and that you have added the opc to stripe like it stated in the instructions. Other possible solutions include swapping files from different versions of the module until you get it working or give up and restore what you originally had and stick with 3 page checkout. I tried 4 versions before I got mine remedied with an issue that resulted in payments but no orders :)

With the heavy customisation and big bills i was given to do them i made use of chatgpt to do alot of the heavy work and pay for the monthly subscription plan, i threw your error codes at it and it gave quite a helpful response (sometimes it can be way off the mark) and this seems like the solution is in the settings for stripe where it asks if you are using OPC not being selected, if it is selected and still giving you issues then follow the chatbots guidance....

You’re seeing the “Undefined variable $stripe_select” warnings because neither your one-page checkout controller nor your template ever actually set that variable before including your Stripe JavaScript snippets. You have two choices:

1) Define $stripe_select before you use it
If you really need the variable (for example you’re injecting a dynamic element ID into your JS), then at the very top of

swift
Copy
Edit
includes/modules/pages/checkout_one_confirmation/jscript_stripe.php
(and in your tpl at the top of

bash
Copy
Edit
templates/abyss_cobalt/templates/tpl_checkout_one_confirmation_default.php
) add:

php
Copy
Edit
<?php
  // make sure we always have *something* in $stripe_select
  if ( !isset($stripe_select) || !strlen($stripe_select) ) {
    // this should be the ID of your Stripe wrapper element—
    // change it if you’re mounting to a different DIV
    $stripe_select = 'payment-element';
  }
?>
That will stop the notices and give your JS something to target:

php
Copy
Edit
<script>
  // before: document.getElementById('<?php echo $stripe_select;?>')…
  // now $stripe_select is guaranteed to exist
  const paymentEl = document.getElementById('<?php echo $stripe_select;?>');
  …
</script>
2) Remove the variable altogether
If your Stripe integration no longer needs a PHP-injected element ID (for example you hard-coded #payment-element in your JS), simply delete every reference to $stripe_select:

In jscript_stripe.php remove or comment out any lines using $stripe_select.

In your template (around line 238), replace

php
Copy
Edit
document.getElementById('<?php echo $stripe_select;?>').…
with

js
Copy
Edit
document.getElementById('payment-element').…
Why it happened
Zen Cart’s one-page checkout stashes almost everything in $POST and in the $payment_modules object—you have to explicitly assign template-scope variables if you intend to echo them later. Since $stripe_select was never set in the controller, PHP correctly warned that it didn’t exist.

Pick one of the above strategies and those warnings will go away.

Sounds like a credible solution... take file and database backups first and thoroughly test if all seems to show up, ie make sure you can submit an order and it get recorded by zencart

13 May 2025, 5:06 PM
#591
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

flappingfish:

With the heavy customisation and big bills i was given to do them i made use of chatgpt to do alot of the heavy work

That's how I've been working and ironing all the issues in this update. What you gave is the same I got here, I added those and now it's suggesting to not have 2 submit buttons and to eliminate the ZC one, which I don't want to, I'm going to read a post that I saw talking about this. I'll continue with tests and will report.

@CarlWhat, I thought so too and checked before, it doesn't seem to be that but I will have it in my mind while I continue working with it.

So I guess, no one is using it with OPC?

IDEASLady
IDEAS Creative Studio

Your image... our business!

13 May 2025, 5:20 PM
#592
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
319
Plugin Contributions:
4

Re: Stripe.com payment integration module

So you have OPC working now but have 2 confirm buttons? Perhaps wrap the zen one in a conditional statement so it does not appear if stripe is active??

If i had OPC myself I'd have most likely known of and resolved the issue but I'd break my site adding opc I think 🙃

For my customisations it relies on 3 step checkout, step 1 is normal, step 2 had a "physical ticket" option if one of the items is a ticket. Step 3 loads like usual but if customer has ticket and selected physical ticket it adds calculations before step 3 where we see the payment form for the ticket surcharge. I think I would be faced with fatal errors and white screen of death if I tried OPC without further customisations

14 May 2025, 5:58 AM
#593
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

flappingfish:

So you have OPC working now but have 2 confirm buttons? Perhaps wrap the zen one in a conditional statement so it does not appear if stripe is active??

If i had OPC myself I'd have most likely known of and resolved the issue but I'd break my site adding opc I think ������

For my customisations it relies on 3 step checkout, step 1 is normal, step 2 had a "physical ticket" option if one of the items is a ticket. Step 3 loads like usual but if customer has ticket and selected physical ticket it adds calculations before step 3 where we see the payment form for the ticket surcharge. I think I would be faced with fatal errors and white screen of death if I tried OPC without further customisations
No, it never worked, that's what ChatGPT said.

I got it working on default checkout but trying to make it work on OPC, I made a doodoo and now it's not working at all. :blush: I guess I will have to start all over again.

What I noticed (and I might be wrong) is that the form is not appearing on OPC maybe because it's not being inserted in tpl_modules_opc_payment_choices.php, nor credit_selections, so maybe that's why it's not working with OPC.

IDEASLady
IDEAS Creative Studio

Your image... our business!

14 May 2025, 8:00 PM
#594
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

@Gozzandes (or anyone that made it work and wants to help)

Please, when you get a chance, I need help with this module.

I have installed 3 versions, the latest being 2.1.9, and I'm still without the cc form. It doesn't work at all in any of the 2 ways (default or OPC). I've been 3 days with this and not getting anywhere :frusty:

Right now, there are no errors, but OPC hangs there without throwing errors when I stop.

I got it working with a mix of 2.1.4 and 2.1.8, but only for default checkout but trying to make it work with OPC I messed something up and don't know which files are which. I can check my references but there were so many changes that I decided to start all over again with the latest version. Also, there are so many changes and editions in this thread that it's difficult to follow.

Thanks in advance.

IDEASLady
IDEAS Creative Studio

Your image... our business!

21 May 2025, 2:35 PM
#595
gozzandes avatar

gozzandes

Zen Follower

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

Re: Stripe.com payment integration module

In Zen Cart's Stripe payment integration module, the CC form is embedded in tpl_checkout_confirmation_default.php.
Therefore, it must be placed inside the correct folder:
includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php
If this file is missing or incorrectly placed, the credit card input form will not appear during checkout.
Alternatively, if you delete includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php,
Zen Cart will automatically fall back to the default template, which might resolve the issue.
To troubleshoot further:

  • Ensure the correct file exists in the right directory.
  • Try using the default template by deleting the custom one.
  • Check for JavaScript errors or missing Stripe scripts in the browser console.
  • Clear the cache (both Zen Cart and browser) to ensure changes take effect.
    I just noticed your post now. I’ve been busy with rice planting for the past month and haven’t been able to check. I’m really sorry about that!
    This should help clarify things! Let me know if you'd like any refinements.
    You're really getting to the bottom of this issue!

This should capture everything you wanted! Let me know if you'd like any tweaks.
Hope the rice planting went well—sounds like a busy month!

21 May 2025, 3:44 PM
#596
gozzandes avatar

gozzandes

Zen Follower

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

Re: Stripe.com payment integration module

To ensure the correct template is used in Zen Cart's Stripe payment integration module, follow these steps:

  • Check your active template:
  • Go to Admin => Tools => Template Selection to find out which template is currently in use.
  • For example, let's say your active template is "flowers".
  • Place the necessary files in the correct directory:
  • Move all files from includes/templates/YOUR_TEMPLATE/ into includes/templates/flowers/templates/.
  • This ensures that the checkout confirmation page correctly loads the Stripe CC form.
  • Alternative method:
  • If you want to use the default template instead, delete includes/templates/flowers/templates/tpl_checkout_confirmation_default.php.
  • When this file is removed, Zen Cart will automatically fall back to the default template located at:
    includes/templates/default_template/tpl_checkout_confirmation_default.php.
21 May 2025, 3:44 PM
#597
gozzandes avatar

gozzandes

Zen Follower

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

Re: Stripe.com payment integration module

To ensure the correct template is used in Zen Cart's Stripe payment integration module, follow these steps:

  • Check your active template:
  • Go to Admin => Tools => Template Selection to find out which template is currently in use.
  • For example, let's say your active template is "flowers".
  • Place the necessary files in the correct directory:
  • Move all files from includes/templates/YOUR_TEMPLATE/ into includes/templates/flowers/templates/.
  • This ensures that the checkout confirmation page correctly loads the Stripe CC form.
  • Alternative method:
  • If you want to use the default template instead, delete includes/templates/flowers/templates/tpl_checkout_confirmation_default.php.
  • When this file is removed, Zen Cart will automatically fall back to the default template located at:
    includes/templates/default_template/tpl_checkout_confirmation_default.php.
21 May 2025, 10:38 PM
#598
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,447
Plugin Contributions:
3

Re: Stripe.com payment integration module

Gozzandes:

To ensure the correct template is used in Zen Cart's Stripe payment integration module, follow these steps:
....

I have done all that troubleshooting, and the form didn't appear in any of the templates. Even uploading the files to those templates' custom folders. The form doesn't appear on checkout. Right now, I'm not sure if the testing was going through or not at the end, but for sure, I couldn't enter the testing numbers; it just went through without form, the times it did.

I stopped the day of that post. I'll check if this coming weekend I can work on it again.

IDEASLady
IDEAS Creative Studio

Your image... our business!

23 May 2025, 10:45 AM
#599
gozzandes avatar

gozzandes

Zen Follower

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

Re: Stripe.com payment integration module

Stripe Module Process Flow in Zen Cart

  1. Stripe API Key Loading

    • The system loads the Live Key and Secret Key from the Zen Cart admin settings.
    • Without these keys, the Stripe module cannot generate the Client Secret, and the payment form will not appear.
  2. Price Validation

    • The module verifies the minimum transaction amount required by Stripe.
    • For USD, the minimum amount is $5 (this value may vary depending on currency and Stripe settings).
  3. Generating Client Secret

    • Once the Stripe keys are verified, the module uses the Secret Key to request a Client Secret from Stripe’s API.
    • This Client Secret is essential for processing payments securely.
  4. Checkout.js Receives the Client Secret

    • The checkout.js script takes the Client Secret and initializes Stripe’s payment form.
    • The payment form is dynamically injected into tpl_checkout_confirmation_default.php.
    • If the form does not appear, possible issues include missing API keys, JavaScript errors, or conflicts with OPC (One Page Checkout).

Ensuring the Correct Template is Used

To properly integrate Stripe's payment form, follow these steps:

  1. Check your active template:

    • Go to Admin => Tools => Template Selection to find out which template is currently in use.
    • For example, let's say your active template is "flowers".
  2. Place the necessary files in the correct directory:

    • Move all files from includes/templates/YOUR_TEMPLATE/ into includes/templates/flowers/templates/.
    • This ensures that the checkout confirmation page correctly loads the Stripe CC form.
  3. Alternative method:

    • If you want to use the default template instead, delete includes/templates/flowers/templates/tpl_checkout_confirmation_default.php.
    • When this file is removed, Zen Cart will automatically fall back to the default template located at:
      includes/templates/default_template/tpl_checkout_confirmation_default.php.

Debugging and Troubleshooting

  1. Check PHP Error Logs

    • Zen Cart logs system errors, so reviewing the logs (/logs/ directory) can provide insights into potential problems.
  2. Use Browser Developer Tools

    • Open the developer console (F12) and check for JavaScript errors related to Stripe.
    • If the Stripe scripts aren’t loading properly, the payment form won’t appear.
  3. Verify Stripe API Settings

    • Ensure that the Live Key and Secret Key are correctly set in the admin panel.
    • Without these, the system cannot generate the Client Secret, which is needed to display the payment form.
  4. Confirm Test Mode Behavior

    • If the transaction is processing without entering card details, it could indicate an issue with test mode or a missing Client Secret.
    • Check if Stripe’s dashboard logs any transaction details to confirm whether payments are actually being processed.
26 May 2025, 6:45 AM
#600
gozzandes avatar

gozzandes

Zen Follower

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

Re: Stripe.com payment integration module

When using the Stripe module with OPC, go to the Admin page => One-Page Checkout Settings => Payment Methods Requiring Confirmation, then push the edit button. Rewrite eway_rapid,stripepay,gps to eway_rapid,stripe,gps.