The Stripe payment module is now available here:
http://www.zen-cart.com/downloads.php?do=file&id=1548
Printable View
The Stripe payment module is now available here:
http://www.zen-cart.com/downloads.php?do=file&id=1548
Hi,
I just installed this module on my zen cart site, and tried it out. Seems to work great, only problem I can find is that for some reason when it sends the email it says 'Payment type: stripe secure card You do not have javascript so cannot use stripe' or something like that. I am really new to zen cart so not exactly sure if this is caused by the module, or the cart. Any help is appreciated.
Thanks,
-Michael.
Hi Michael
Ahhh - looks like I overlooked the email part of things when I was updating the module - only the most recent downloads will have the problem so folks who downloaded before 20th November or so should be OK - if cannot see the code below in your file then you can ignore this.
So for you & everyone here's a fix to your problem I've just uploaded a v1.2 with this change in it
Find the file includes/modules/payment/stripepay.php and at around line 30 you should see a block of code like this:
Now carefully edit the last full line of code by adding two slashes (php comment) at the start of the line so that it looks like:Code://admin title info
if (IS_ADMIN_FLAG === true) {
if (!function_exists('curl_init')) $this->title .= '<strong><span class="alert"> CURL NOT FOUND. Cannot Use.</span></strong>';
if ( MODULE_PAYMENT_STRIPEPAY_TESTING_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_TESTING_PUBLISHABLE_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_MERCHANT_LIVE_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_LIVE_PUBLISHABLE_KEY == ''){
$this->title .= '<strong><span class="alert"> One of your Stripe API keys is missing.</span></strong>';
}
if (ENABLE_SSL_CATALOG!=='true'){
$this->title .= '<strong><span class="alert"> Catalog SSL appears to be missing. Live payments are not possible</span></strong>';
}
}else{//client side
$this ->title.='<noscript><br><span style="color:red">Javascript is not enabled in your browser - you cannot checkout using Stripe</span></noscript>';
}
// $this ->title.='<noscript><br><span style="color:red">Javascript is not enabled in your browser - you cannot checkout using Stripe</span>
The full chunk of code should now look like that shown below
That's probably the easiest way of editing out the <noscript> for the moment.Code://admin title info
if (IS_ADMIN_FLAG === true) {
if (!function_exists('curl_init')) $this->title .= '<strong><span class="alert"> CURL NOT FOUND. Cannot Use.</span></strong>';
if ( MODULE_PAYMENT_STRIPEPAY_TESTING_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_TESTING_PUBLISHABLE_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_MERCHANT_LIVE_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_LIVE_PUBLISHABLE_KEY == ''){
$this->title .= '<strong><span class="alert"> One of your Stripe API keys is missing.</span></strong>';
}
if (ENABLE_SSL_CATALOG!=='true'){
$this->title .= '<strong><span class="alert"> Catalog SSL appears to be missing. Live payments are not possible</span></strong>';
}
}else{//client side
// $this ->title.='<noscript><br><span style="color:red">Javascript is not enabled in your browser - you cannot checkout using Stripe</span></noscript>';
}
Apologies for my oversight
Graeme
I was wondering if it would be possible to take the credit card details on the second page, in the same way that the authorize.net payment module takes the credit card info. on the second page (the payment confirmation page, rather than the order confirmation/finalize page).
I ask because customers prefer to see that their information is entered before they finalize the order, and you can't tell if the information has been properly saved or not with how the module is set up now.
Thanks for the help. :)
P.S. - Otherwise, this is an excellent payment module! It made me try out Zen Cart for the first time, and I am loving it much more than other similar carts. :D
Hello and good day. Just downloaded the Stripe module, unzipped it, uploaded the stripe_zencartv12 folder to /(storename)/includes/modules/payments/ and then went to the admin section, modules, payments and there is no option for stripe to install it...what did I miss???
Hi Graeme,
First I wanted to say THANK YOU for creating this stripe payment integration module!!
I had looked into stripe about 6 months ago but at that time there was no module. I have been using Authorize.net for the last few years and have been wanting to get away from all the crazy monthly fees. I am very excited to start using stripe but have a problem I am running into.
I set up an account with Stripe and installed your module. The problem is that in the admin panel the stripe payment module is saying this in red
"Stripe secure payments Catalog SSL appears to be missing. Live payments are not possible"
I have a legitimate SSL and even checked my site using www.ssllabs.com/ssltest/analyze.html which showed my site is secure. I have also been using Authorize.net for a long time with no problems.
So what do you think is causing the stripe module to give me this error?
I did a test transaction and everything processed fine. I have also put it in production mode and gone through the checkout process and it looks like the stripe payment module is good (have not checked out all the way and actually run through a real order with real credit card in production mode)
When you start checking out using my zencart website my web address does switch to https:// so seems like the SSL is fine.
Any idea?
Thank you for any help as I would love to get the stripe module live as soon as I can and get rid of my Authorize account ;)
Paxton Mobley
http:www.paxtonfinebuckles.com/store
Hello, I think I may have found a bug. Some of my customers were getting the error message, "amount must be a positive integer in cents" when attempting to check out. I found the following line of code in stripepay.php:
I added the round function to the calculation and it seems to have corrected the issue:Code:"amount" => ($order->info['total']) * 100, // amount in cents
Please note there are several instances where this line needs to be changed.Code:"amount" => round($order->info['total'], 2) * 100, // amount in cents
Other than that - everything seems to be working fine! Thanks so much!
James
From my original post:
"The problem is that in the admin panel the stripe payment module is saying this in red "Stripe secure payments Catalog SSL appears to be missing. Live payments are not possible""
Got this problem figured out. It was a setting in my zencart site. I had not changed the code in the configure.php file in the admin/includes folder to "true" for ssl secure catalog. Found the information here http://www.picaflor-azul.com/blog/?p=997 but sure you can also find it on the zencart site by perching about making your website secure. Now to run some test and see if everything works with the stripe module! I will be sure to re-post if it does end up replacing my current Authorize .net payment processor. Thanks!
Paxton
Could you let me know if and what code I could modify to display not just the credit card expiration month on checkout page (January) but also the month number (1 January) ? I just feel it is more convenient for customers as most credit card expiration's are shown on the card as numbers. Can this be done?
I search through the stripe files but could not find the code source.
Thanks
Paxton---
Do you have people actually complaining that they're confused by the month being displayed?
A few years ago I was building a website for a client and they felt strongly about displaying both number and month to make it easy on the customer so thats what I did for them. Recently when I installed this module and was testing the credit card system I found myself double checking when I entered the expiration month afraid I might be entering the wrong one so wondered to myself if other customers might get a little frustrated over this. Guess it all depends on how well you know your month numbers ;) I asked several people (not customers) what there preference would be and about half said they would prefer to see both.
Just seems the easier and more user friendly you can make the checkout process the more return customers you will hope to have. I know I myself like it better when the sites I use my credit card on also have numbers. Just did not know if the code was in the module or somehow brought in from the stripe server and could not be altered.
It's probably code in the module itself, and likely in the confirmation() function, since that's what prepares the content which is eventually requested and displayed by the template.
Thanks for the push in the right direction. Spent a few hours on it and just can not seem to locate any code I can edit to add the month numbers :(
Not a big deal but now I want to figure it out just because ;)
Looked in every module file and didn't see any changeable code that relates to the months.
I did find different instances of this:
Thought maybe it was calling for a zencart file that maybe had the months in it. Did find one but changing the instances of say January to 1-January did not update the stripe payment page. Should not be this hard to find but maybe im looking in the wrong place or thinking to symple (find months and change to number plus months).Code:$confirmation['fields'][] = array(
'title' => '<span class="card_hide" style="margin-right:10px">' . MODULE_PAYMENT_STRIPEPAY_CREDIT_CARD_EXPIRES . '</span>'.zen_draw_pull_down_menu('', $expires_month, '', 'class="card_expiry_month card_hide"') . ' ' . zen_draw_pull_down_menu('', $expires_year, '', 'class="card-expiry-year card_hide"'),
'field' => ''
When you look at the view page source from my checkout page you see this portion of source code. Thought it might help me sort it out but dint really. If you see anything let me know.
I will try and look into it a little later and if I find a solution I will post.Code:</script><script type="text/javascript">
function stripeResponseHandler(status, response) {
if (response.error) {
alert(response.error.message);
//$(".payment-errors").text(response.error.message);
} else {
var form$ = $("form[name=checkout_confirmation]");
var token = response['id'];
form$.append("<input type='hidden' name='StripeToken' value='" + token + "'/>");
if ( $('.new_stripe').attr('checked')) {
form$.append("<input type='hidden' name='StripeSaveCard' value='YES'/>");
}
form$.attr('action', 'index.php?main_page=checkout_process');
//hide button
$("#tdb5").hide();
// and submit
form$.get(0).submit();
}
}
</script></div>
<div class="important">
<div class="back"><span class="card_hide" style="margin-right:10px">Card Owner</span><input type="text" name="" value="Marne Mobley" class="card-name card_hide" /></div>
<div ></div>
<div class="back"><span class="card_hide" style="margin-right:10px">Credit Card Number</span><input type="text" name="" style="display:inline-block; padding-right:10px" class="card_number card_hide" /></div>
<div ></div>
<div class="back"><span class="card_hide" style="margin-right:10px">Expiry</span><select name="" class="card_expiry_month card_hide">
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
Just wanted to say thanks DrByte for all your contributions to the zencart community! I have been using these forums for years now and have found many successful answers to my questions from your posting! Made a donation at one time for you guys but need to do it again as zencart is an awesome shopping cart and community!
I just noticed this same problem installing the module on a second zencart site I have. My first website, zencart version 1.3.8a, did not have this error so far after several transactions but my second website using zencart 1.3.9h got the error first time I ran a test transaction. I am going to try and make the alterations like James suggested.
Sure hope the developer is monitoring this thread as it would be great to hear if this is the correct fix or not for this error. Please let us know if you get a chance. Thanks.
Firstly, thank you for making this module. I greatly appreciate it. I have it installed now in test mode locally.
Is it possible to display credit card images during Step 2 of 3 for Stripepay checkout? During this step Paypal shows their logo or the payment types they accept. It would be great to have Stripepay show the credit cards as well (where it calls an image from the installed server).
I am not a programmer. I tried to see if I could implement it and have failed. I looked at the paypal payment files. I attempted to do the same for two stripepay.php files. I've missed something somewhere. This is what I've done:
in /includes/languages/english/modules/payment/stripepay.php I added the following lines:
in /includes/modules/payment/stripepay.php I have the following in lines 23 to 29 (give or take a few lines)PHP Code:
define('MODULE_PAYMENT_STRIPEPAY_BUTTON_IMG', '/images/cc_images.jpg');
define('MODULE_PAYMENT_STRIPEPAY_BUTTON_ALT', 'Pay Securely');
define('MODULE_PAYMENT_STRIPEPAY_ACCEPTANCE_MARK_TEXT', '');
define('MODULE_PAYMENT_STRIPEPAY_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_STRIPEPAY_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_STRIPEPAY_BUTTON_ALT . '" title="' . MODULE_PAYMENT_STRIPEPAY_BUTTON_ALT . '" /> ' .
'<span class="smallText">' . MODULE_PAYMENT_STRIPEPAY_ACCEPTANCE_MARK_TEXT . '</span>');
As I mentioned before, I'm not a programmer. Is what I'm trying to do possible? If so, can you tell how to do it? It would be great to show customers which credit cards are accepted during checkout so they fully know their options.PHP Code:
$this->code = 'stripepay';
$this->api_version = 'Stripe Payments v 1.2 for ZenCart';
// $this->title = MODULE_PAYMENT_STRIPEPAY_TEXT_TITLE;
$this->button_img = MODULE_PAYMENT_STRIPEPAY_BUTTON_IMG;
$this->description = MODULE_PAYMENT_STRIPEPAY_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_STRIPEPAY_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_STRIPEPAY_STATUS == 'True') ? true : false);
Theres seems to be an issue with Canadian customers and STRIPE....STRIPE calls their Canadian currency CAD and the stripe module seems to call it CAN. When I try a live test purchase, you get this message:
I have looked at all the files, even used the search function but cannot find where the module calls Canadian Currency CAN. I think if it is changed to CAD, the module will work. Makes me ownder if I am the first Canadian to use this module?Quote:
Invalid currency: CAN. You can use these currencies: cad. Your currency was chosen when you activated your account. To process in a different currency, you'll need to create a new account.
Probably best to ask the module's author.
The problem i am having is that the module is passing the shipping zipcode to stripe and the payment is failing.
Hi all
Firstly my apologies for not replying to the thread - I did not realise that I only got one notification at a time....
IF YOU HAVE PROBLEMS POST HERE BUT ALSO PM ME AS PM'S ARE GETTING THROUGH JUST FINE.
OK - Canadian Currency was mis coded as CAN - now changed to CAD so it'll work for you. Also added in GBP (currently beta in the UK) and EUR as currency choices.
Code also updated to send over the billing and not the shipping address - note that if AVS checking is set to False then no billing address will be passed at all to Stripe
I'll send up a new zip package but the includes/ files should be attached here - the only change is to the includes/modules/payment/stripepay.php file
I've also spoken to Strip and they state that to have PCI compliance you must have an SSL on your site.
Graeme
Hi there - thanks for this I'll change the code in the zip file to match - I'm guessing that when the order total gets multiplied by 100 there's a chance that it may actually be something like $100.1111 so we're sending 10011.11 to Stripe and they're not liking the .11 bit
I'm about to upload v1.3 to the package page - if you open the file includes/modules/payment/stripepay.php and look at around line 114 you'll see some new code
There's three blocks in there that control how the $expires_month array is constructed - each delineated by lines of #######################
If you want to use a different text in the dropdown then uncomment the one you want and comment out the original.
The one you want is the second block of code.
Code:##################### displays month name in drop down ###############
for ($i = 1; $i < 13; $i++) {
$expires_month[] = array(
'id' => sprintf('%02d', $i),
'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000))
);
} //$i = 1; $i < 13; $i++
##################### displays month name in drop down ###############
##################### displays month name and number in brackets in drop down ###############
/* for ($i=1; $i<13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B - (%m)',mktime(0,0,0,$i,1,2000)));
}
$today = getdate();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$expires_year[] = array(
'id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)),
'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))
);
} */
##################### displays month name and number in brackets in drop down ###############
##################### displays month number in drop down ###############
/* for ($i=1; $i<13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%m',mktime(0,0,0,$i,1,2000)));
}
$today = getdate();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$expires_year[] = array(
'id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)),
'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))
);
} */
##################### displays month number in drop down ###############
Hi
Yes - you were the first Canadian to use the module (and we being numpties) had coded your currency in wrong! Fixed in 1.3
+++++++++++++++++++++++++++++++++++++ Update ++++++++++++++++++++++++++++++++++++++++++
Hi all
As the author of the plugin I'd like to thank everybody for their input & bug crunching/detecting. If you find any other errors please PM me with them and I will try to sort them out asap for you as I do not visit the forums here very often.
I've just uploaded a zip to the modules page with v1.3 in it (Zip id called stripe_zencartv13a.zip) http://www.zen-cart.com/downloads.php?do=file&id=1548 (it takes a while to appear so if you don't see version 1.3 there wait a bit)
changes to that are:
Canadian currency problem fixed
Billing address/shipping address screw up fixed
GBP and EUR added
Manual code to change the dropdown display added
Order total round() function added as per above post
Currently Stripe are at Beta here in the UK so whilst you can experiment with GBP you cannot (as yet) have this linked to a live store/bank account.
EUR is not yet accommodated at Stripe.
One 'gotcha' is that if you do not enable AVS checking in your Zencart admin then no billing address information at all will be sent to Stripe - if you are seeing 'billing city = null' and so on at Stripe then there's your likely suspect.
This module uses the stripe.js file (there is a PHP library supplied by Stripe that is in the zip file in the ext folder but is unused) and grabs it from Stripe each time the checkout_confirmation page is entered. Stripe have told me that in order to be fully PCI compliant you must use the .js package and you must have SSL in your checkout. In our osCommerce package we've put a great big warning as regards SSL on the live customer facing pages - this is not in the Zencart version but you must be aware of the need for SSL.
Graeme
I just installed this module and saw that the credit card year was not working with the default of "displays month in name". So in the above file in the "displays month in name" drop down section I duplicated this code;
$today = getdate();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$expires_year[] = array(
'id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)),
'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))
);
Just before this line;
//$i = 1; $i < 13; $i++
And that fixed the problem. It looks like just a simple oversite on the commenting. I have another issue that I will start another thread on.
I just installed the module. I am trying to run in test mode and have a valid account at Stripe, I am not using SSL presently I wanted to test first.
When I post a payment the url goes to this- http://aperioguitar.com/shop/index.p...eckout_process, the screen is just blank and it stays there forever. This line of code appears at line 288 in stripepay.php and I think is displayed because the form submit was executed. I am lost from there as to what should happen but it does nothing
I am a former programmer from 'back in the day' but have forgotten more than I knew and would like some direction if anyone can offer. Thanks.
Hi
It should only go to checkout_process after the Stripe token has been received from Stripe - (lacking SSL should not stop the module either)
You could try popping an error echo into the php in checkout_process
error_reporting(E_ALL);
ini_set('display_errors', '1');
see if that shows anything up
Graeme
Hi Graeme,
Thank you for writing back so quickly. With the help of your debug statements I was able to determine that when I moved the module files to the server my ftp client moved them all up as lower case. I always use lower case on my Linux site (Godaddy) because it makes handling my user stuff easier. Once I repeated the upload without forcing lower case the calls to the various php files with upper case characters worked fine. Maybe this will help someone else.
I then ran through all the different card failures listed on Stripe and it worked fine with the exception of "address_line1_check will fail" which I could not get to fail. That may be something within Stripe though.
As I see it right now your code works fine and beer money will follow after some live testing with SSL later this week!
Thank you for your work.
Installed your mod today and looks great, however when I enabled it on my checkout page (I'm using Fast & Easy Checkout) and when you select it, we get a "Your order is being processed" message and the program just sets there trying and trying to load? Any suggestions for what is happening.
I can PM you with a link if needed to see. Any help would be appreciated.
Hi - can you tell me which Fast Easy Checkout you have there - is it:
http://www.zen-cart.com/downloads.php?do=file&id=594
Thanks
Hi Pablo
The Stripe module kind of reinvented the wheel a little in that the payment data fields were shifted to the confirmation page (that's where we placed them in the osC version so when it was ported over there they remained - I have been asked to shift them to the confirmation page but I've not had the time to do so yet)..... so we have to do a little fudging.
OK - so the FEC you are using works by grabbing all the order info and displaying it on one page (http://www.yourdomain.com/index.php?...fecaction=null) - when you click 'confirm order' on that page it sends you to http://www.yourdomain.com/index.php?...action=process and automatically submits the form on that page . It does this by simply hiding all the stuff that is normally visible in the final checkout page on a standard ZC store and javascripting a form submission.
So we have to stop the submission and display the checkout_confirmation form fields - this has been done by modifying the inlcudes/modules/payment/stripepay.php file which is in the attached zip file. It has been edited to make a jQuery alteration to the hiddenFields css so that they display. Also further edited to handle the form name which is different from a standard ZenCart. Finally edited a little bit more to pass any Stripe errors back to the checkout page
Also in the zip there is a template file tpl_fec_confirmation_default.php that is in the classic template folder - you'll need to shift that to whatever template folder you are using. This has been edited so that if Stripe is the chosen payment method then it will (1) display any errors from Stripe (2) remove the 'Your order is being processed' line.
I've only worked with the default FEC and it looks like there are a load of bells and whistles in there so if you find that this does not work for you get back to me.
Graeme
p.s. anybody else using FEC grab the zip and deploy it as described above - I don't intend adding these changes to the stock download
p.p.s if you edit the includes/modules/stripepay.php file as above to work with FEC and then turn off FEC it will no longer work with the default ZC setup so you'll have to upload the original stripepay.php file
Well that went to the conformation page, however it still is stuck in a loop and you cannot enter any credit card information.
Before your replay, I turned off FEC and was able to get it to kind of work, however you could not choose a card expiration year.
I would like to be able to use this with FEC, but something is still ~~~~
Hello! I love your stripe module, but I ran into an issue today that had me pulling my hair out.
Using the specials or salemaker to take off a percentage causes an issue with Stripe due to the decimal points.
This appears to be solved by changing any code in stripepay.php that looks like this:
to look like this:PHP Code:
($order->info['total']) * 100
The former takes any price with two decimal places and brings it up to Stripes' standards. Adding "floor" removes the extra remaining decimal that the salemaker and special functions add to it when using percentages.PHP Code:
floor(($order->info['total']) * 100)
I hope this is both right and works for anyone else trying to use the salemaker. :D
Oh, one other thing. For some reason when I installed the 1.3 version, there was no longer the choice to pick the expiration year of the credit card during checkout. So the changes above were made to version 1.2.
I just installed the module and see this problem with the year. So what is the best solution? Going back to 1.2 would mean missing out on improvements since then. If the bug is known, in which file is it so I can go and edit.
Thanks.
Hi all
I've just uploaded a 1.3.1. that fixes the commenting error that was preventing the dropdown from displaying the correct choices for expiry date.
It also includes the floor() change to the order total suggested by filmgirl.
Any problems add a reply here and I'll get my 'toit' (as in a 'roundtoit') on the case.
p.s. it will take a couple of hours for 1.3.1 to appear in the downloads section so attachedAttachment 12603 is a zip of the /includes/ folder only
Ran into a problem with this module "Invalid Integer" I was able to track this down to the sales tax making the value being passed to stripe a decimal 1061.4375 ($9.99 plus 6.25% tax or $10.61). I was able to correct this in the module by adding round to amount lines in stripepay.php like this
"amount" => round(($order->info['total']) * 100)
multiple lines look like this
However I think this could probly be fixed in zencart core to round tax amounts before adding to totals creating prices with more than 2 decimal places. I think this problem only showed itself because Stripe requires cents(price * 100) only to be passed.
Attachment 12647Attachment 126471 Issue:
1. I cant view my orders in the admin area after installing 1.3.1
I can only view the top part of any order.
im using zencart 1.3.9h
any help here?
Hi
Yup - my bad - it's the <noscript> tags that were added in for non javascript users in the front end - the module is adding them into the order table as part of the title but, as the field insn't long enough the </noscript> is missing so, effectively everything on the page is hidden after that.
I'll upload a new package but, in the meantime I've attached a revised includes/modules/stripepay.php that has no <noscript> so the problem will go away.
For existing stores and you are happy to use phpmyadmin then run this query to fix missing orders:
UPDATE `orders` SET `payment_method` = 'Stripe secure payments' WHERE `payment_module_code` = 'stripepay'
(if you have a DB_PREFIX add that in before orders)
Ok - new package on the upload queue
Here's a fix for non phpMyadmin type folks
Save this code as a filename that you can remember and upload it to your store admin folder.
Login to your admin area and then type the url for the file into the address bar - you should get redirected to the orders page with a 'success' message
===========================================================================
<?php
/**
* @package stripepay fix
* @copyright Copyright 2003-2010 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*
*/
require('includes/application_top.php');
$db->Execute("update " . TABLE_ORDERS . " SET payment_method = 'Stripe secure payments.' WHERE payment_module_code = 'stripepay' " );
$messageStack->add_session('Stripe payments fix completed', 'success');
zen_redirect(zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('action')) . 'action=edit', 'NONSSL'));
?>
worked thanks!
Hi, great plugin and I love the Stripe offering:smile:
I am running Zen-cart version 1.5.1. I have installed the plugin and configured it to best of my ability. I have also created an account with Stripe and I am able to process the orders using their test credit card number ending in 4242.
I started by creating an order, asking the cart to save my CC number and processed the first order. While still logged in, I created another order and this time rather than inputting my cc number I selected the option that says "use my save CC ending in 4242". However, when I click confirm order I get "You must supply either a card or a customer id" error!
I checked my Stripe account and my test customer has a customer ID (cus_21tq8...) but I am still getting the error.
What am I doing wrong?
First of all, sorry for back to back posts, I really like this plugin and hopping to get it to work.
I am running version 1.5.1 and FEC version 1.11.0. I have installed the plugin and the patch you have provided to fix the reload reported by Pablo.
Based on your recommendation and since I have installed Abbington Mega template, I copied the tpl file to my Abbington folder, but after inputting the info and pressing Confirm the page start loading over and over.
Any help will be greatly appreciated.
Are there detailed instructions on how and where to install stripe on your server?
I have it installed but out on the site, there's no payment option available other than paypal for the cart. I have my keys input and it's in production mode on an SSL. Just wondering if I'm missing something simple? Help! :)
Oh my gosh, I completely missed that! Thank you!!!!
I installed the module on my site and it is currently running in test mode (working on ssl). However, when I try to run a dummy transaction, I get the following error:
the 'exp_month' parameter should be an integer (instead, is undefined).
Any insight at all would be greatly appreciated!
Hi, would you please tell me which version of zen-cart is this module suitable for? My zen-cart version is 1.5.1
Because I have downloaded it, upload all the related files to my server and installed it in my admin interface. However it shows me this sentence: "WARNING: An Error occurred, please refresh the page and try again". When I back to my admin interface, I can see it says Stripe secure payments One of your Stripe API keys is missing.
Or is there any other reason resulted in this?
Hi Graeme,
Thanks for the ZenCart / Stripe payment module. I found it easy to set up and it seems to be working great.
# If it's at all possible, I'd really like the credit card form to not look as ragged. It would be nice to have a fixed width for the form labels and the credit card form fields to line up on the left. A sense of order is actually very reassuring to customers that they are making a secure transaction. In my template (Zen Classic), it comes out looking very haphazard.
The span tags surrounding the labels seem to be using a class called "card_hide" which I cannot find defined in any style sheet in the stripe module or zen cart. I searched my entire Zen file set and the "card_hide" seems to be used only in the stripepay.php payment module file and is not defined anywhere. Perhaps shoring this up will help the labels and form fields look more organized?
I edited these tags to have a style of "display: inline-block; width: 150px;" and that seems to have worked. Although, I really prefer to not make changes to files that aren't really mine to change!!
# The wording in the admin panel for "Allow customers option not to save their card details?" is a bit of a confusing double negative, since you choose "False" to turn that feature off. I don't want the option shown, they don't want to save their info. I finally figured it out, but it took me a while to figure out the combination of true/false and checked/unchecked that I needed. I'm only mentioning this because storing or not storing cc info is such a sensitive topic these days, and I think the wording here is making a powerful feature of your module confusing. "Show option to save card details? T/F" and "If above is true, should box be checked or unchecked? Checked/Unchecked" would be my suggestion to help clear that up (but you can obviously ignore this entirely or choose your own wording!)).
Thanks!
~Bonnie
I am running Zen Cart 1.5.1 and the Stripe plugin v1.3.2. While testing, I tested some of the credit card numbers designed to fail in certain ways. When the credit card fails, the customer is simply returned to the Payment Information page in checkout. Is there supposed to be a page that shows the customer that their credit card was declined and why? Am I missing something?
Mal
I believe that has to do with the credit card info you are entering to use for the test. Whatever you are entering for that, it seems to be rejecting as that 'exp_month' has to do with the credit card info itself. At least I cannot think of another parameter that would fit that description.
Mal
+++++++++++++ Note from original developer ++++++++++++++++
Hi all - please note that I am no longer in a position to provide any support via this thread or PM for the module.
Good luck all you Zenners
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Since sakwoya is no longer maintaining this module, does anyone have any suggestions if we have a problem with it? I am looking at using Stripe, but I don't want to leave Zencart!
Hi,
I am also having this issue. I have tried to do some debugging in stripepay.php
Line 306 is where the "exp_month" variable is set as follows:
$confirmation('title') .= 'exp_month: $(\'.card-expiry-month\').val(), 'exp_year: $(\'.card-expiry-year\').val()
When I take out the "'exp_month: $(\'.card-expiry-month\').val()" and replace it with "10", it accepts this hardcoded value and gives me an error that "exp_year" is missing, when I set the exp_year value manually it is continues to ask for the credit card number.
So basically it doesn't seem as if the values on the form are being collected and passed to the variables. Im not a developer so this is as good as it gets from me unfortunately! I would really like to see this mod fixed and begin using stripe
Are there steps one can take to add a currency, or is this controlled by Stripe?
The reason I don't use authorize.net is cost. With Stripe you pay as you go. If one month you only had two or three orders you'll be fine.
With authorize.net you have to pay the monthly fee does not matter what.
So there was never an update on getting this on the checkout page instead of the confirmation page? Seems silly to have it on a different page from the rest of the payment options?
I found a solution if anyone is still looking for the same thing. I found this PAID addon: codecanyon.net/item/stripe-payment-gateway-for-zen-cart/8505063
It adds it to the payment page instead of confirmation and it's very nice. Creater was also very helpful! :)
Hello Can some please post some detailed instruction on how to install the Strype integration into Zencart. The current instructions are extremely vague. I can't believe that anyone was able to get this installed with such vague install instructions. Yes the instructions are heavy on the config, but all it says about the install is the following:
"Download and unzip the payment module package from the Zen Cart website and upload the files to your store. Now go to your admin > modules >payment and you should see an entry for Stripe:"
that's it nothing else about the install.......
This mod is very basic in its install as its just a unzip and drop in. As you have seen most of the work is on the setup in the admin configuration. To install, just drop everything in the includes folder with FTP. The folder structure is the same which this mod does not use the custom templates overrides so nothing else to do.
I used this one: http://zucando.com/zen-cart-modules/...ayment-gateway
The creator of the original one kind of bailed on the project so there is no help for it. The one I just posted is very nice looking and the guy who created it is VERY helpful!
Ok I tried the just drop approach and still nothing shows up in the payment modules section in zc. Can some please please please post specific detailed instruction on how to install this. For instance which includes folder do I drop it into there are 2 includes folders. Also do I drop the whole "stripe_zencartv132" folder or just the contents of that folder, and again where do I drop this. I appreciate any of your help...
Inside the stripe mod zip, you will see a "/includes" folder. This is the catalog side. If this was the admin side you will see the includes inside the folder admin. Payment mods are all installed in the catalog side. EVERYTHING inside the includes folder gets put in your catalog side includes folder.
Advice for you is that I hope you are installing new mods in a test site. If not, make sure you do a complete backup of your files and database. This will ensure that you can revert back if anything goes wrong.
I just installed Version: v1.3.2 of stripe payments module and kept getting errors with the db query in stripepay.php. I had to change
TYPE=MyISAM AUTO_INCREMENT=1 ;
to
) ENGINE=MyISAM AUTO_INCREMENT=1;
I don't recall what the exact error was, but it was preventing this query
"$db->Execute("CREATE TABLE IF NOT EXISTS `stripe_data` ( ... "
in stripepay.php from executing. Changing the TYPE= to ENGINE= at the end of the query fixed it.
From the documentation on the net, I got this:
"
Type has been replaced with engine.
TYPE keyword is depreciated (since 5.0) and not supported in MySQL5.5 (and I think even 5.1). Instead of TYPE keyword use ENGINE keyword."
My database info is:
Server type: MySQL
Server version: 5.6.16 - Source distribution
Protocol version: 10
Received these errors in our log after successfully charging an American Express card through the module:
PHP Code:
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Charge instance: customer
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Charge instance: disputed
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Charge instance: fee
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Charge instance: invoice
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_city
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_country
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_line1
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_line1_check
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_line2
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_zip
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: address_zip_check
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: type
[03-Dec-2014 22:31:41 America/Vancouver] Stripe Notice: Undefined property of Stripe_Object instance: type
I've installed this module on zen cart 1.5.4 with shared SSL and I didn't have any problems that I can remember . My question is what form of Stripe checkout does this module use ? Does cardholder data come onto my server,or is it using Stripe token parameters,so that " You can let us take care of the hardest parts of PCI compliance, like redacting logs and encrypting cardholder details"(Stripe website)?
Does anybody have any information about the security of this module ?
I'm also interested in this question. It seems my other payment module (2checkout) pushes you to their site by passing name, address, cart details, and amount to make payment then redirects back after the payment is successful so any compliance doesn't need to be maintained. I just installed Stripe and it appears since SSL is needed, the transaction is happening on our website which is scary. It doesn't make sense to open myself up to that liability.
Jonathan
BAD ASSUMPTION!
The latest PCI rules are challenging that way of thinking, and closing a lot of unsecure loopholes that were caused by that sort of general assumption. Be sure to understand the latest rules!
Just because it's using SSL doesn't mean the transaction is happening on your site.
I'm not commenting specifically about Stripe here. I'm commenting on the assumption.
You SHOULD be using SSL on your site, regardless what payment module you're using. Customers are giving you their personal identity data, and if you're not using SSL then you're doing ABSOLUTELY NOTHING to protect that data (and their shopping choices too) from being stolen by snoopers online during the form submissions your customers are doing. If you're going to skip using SSL, I strongly recommend you put a big notice up on your site telling your customers that you're not protecting any data they give you. They deserve to be informed, don't they?
SSL is very inexpensive these days ... and in fact it's even possible to get a legitimate dedicated certificate for free nowadays, no strings attached, with initiatives underway by various organizations who firmly believe SSL should be used everywhere.
I get the PCI rules are changing but I'm referring to the present. They haven't changed yet, right? When credit card data is being entered in on your website, it makes YOU liable for protecting that data. It is much better to let that happen elsewhere if you can. Credit card information can be more damaging then obtaining someone's address which can be found by Google.
However, you made a good point about using SSL on your website. Which service do you recommend? Which ones are free?
I didn't disagree with that. I was disagreeing that "compliance doesn't need to be maintained" "if it pushes you off to their site".
The point was that last year they announced that even sites that process payment "offsite" still need to comply with PCI rules; you can't just "wipe your hands cuz it's someone else's responsibility" anymore.
But now we're really digressing far from the topic at hand: using Stripe.
Before I forget,thanks to Sakwoya for writing this module. I think I answered my original question by looking a bit more at the admin settings for this module and reading Sakwoyas comments about it.
The option is in the module admin to create a customer object at Stripe. You can also enable CVV/CVC and AVS checking.
Stripe won't work unless you are connecting over SSL.
The only customer card information from Stripe pay I can find on the server is the last four digits of the card and the expiry date.
Just installed the Stripe module using zen cart V1.5.4. The module reports CVV and AVS errors (as shown is order status) or says that the transaction did not process ("Reload page and try again...") when transaction processed correctly, according to Stripe. Any ideas as to what is happening? Are there plans to update the module anytime soon?
You will more than likely need to modify the module to support 1.5.4.
Example:
look at:
http://www.zen-cart.com/downloads.php?do=file&id=1781
Do a file comparison with an older version of the module.
OR
is it using TLS?
I can see the module but when I try to activate it, the admin console informs me:
"Catalog SSL appears to be missing. Live payments are not possible".
I have SSL installed and I checked it by going to my admin console via a non secure URL and it switched over to https.
I noticed that my admin console is using a SSL until I select <modules><payment> at which point it switches over to http.
I am using ZenCart V1.5.4
Thank you 'bislewl'. That appears to have corrected the SSL problem.
I set MY_ADMIN/includes/configure.php as instructed and tried to install.
I now have the following error message on my <Modules><Payment> window;
"One of your Stripe API keys is missing."
Can you help me again?
I found the answer. I had not entered in my test and live secret and publishable keys. I went to the Stripe dashboard, clicked on settings, found my keys and entered them into the Zen Cart Administration <module><payment> window for the Stripe payment module and now I'm ready to test.
I am using ZenCart 1.5.4 with the Stripe Payment module in test mode.
I am receiving the following error when I try to process a test credit card payment:
Stripe - CVV Failure
I tried setting <Enable CVV/CVC checking> in the ZenCart Stripe Payment module to <False> and a test payment went through.
I have have <CVC Verification> turned off in my Stripe Account Settings.
Please advise.
-Mark
Is there anyway to change the name of the module? Currently it says "Stripe secure payments" when you go to check out. I would like to change it to "Pay with Credit/Debit Card"
If somebody could help I'd appreciate it.
I've installed the module and all seems fine. Except when confirming the order on the checkout_confirmation page I get the following error from Stripe.js
“You must supply either a card, customer or bank account to create a token“
I get the same message in TEST and LIVE modes.
Are there some hidden fields supposed to be present on the page that contain information required?
Has anyone looked at updating this payment-method to use its current (v3.9.0) API version? See https://github.com/stripe/stripe-php for details.
The current Zen Cart plugin (v1.3.2) uses a legacy version of the Stripe API (v1.7.7) and I'd like to use something more recent.
Are UK websites allowed to use Stripe yet as I was informed a while ago we were not able to and was wondering if this had changed
Does anyone know if the latest version of the Stripe plugin supports TLS 1.2? We're using an older version, and Stripe is sending us emails saying that they're sunsetting TLS 1.0 and 1.1 later this year. Will upgrading solve this problem?
Thanks!
Hi everyone, just got this msg from a payment
Stripe no longer supports API requests made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at https://stripe.com/blog/upgrading-tls.
checked with the server and they are all good, so may say that this version is not compatible.
Judging from a quick review of the module's code, the module doesn't dictate what TLS version to use, and therefore relies on your hosting server to auto-negotiate the most secure version of TLS that it supports.
This is considered a best-practice, since the module shouldn't have to tell the server to use the most secure option. The server should be configured to do so automatically.
It would appear that your hosting company has some TLS improvements to do on their server.
now i can manage to process the payment to the final stage, but then i get the usual
WARNING: An Error occurred, please refresh the page and try again.
payment is taken and emails sent, it's just the final checkout page now showing (done a live transaction of £1). how do I debug this? it happens as well with another stripe module from zucando, so must be down to my cart.
tried as well with cash on delivery method and the checkout show as it should/
any help would be much appreciated.
thank you, walter
hi again, looking at the log it seems that no data is written in the stripe_data table on the db, despite the order being processed and charged for
[29-Oct-2016 14:30:25 Europe/London] PHP Fatal error: 1364:Field 'stripe_object' doesn't have a default value :: INSERT INTO stripe_data (orders_id, stripe_charge_id, customers_id, stripe_amount, stripe_amount_refunded, stripe_currency, stripe_customer, stripe_description, stripe_disputed, stripe_fee, stripe_invoice, stripe_paid, stripe_name, stripe_address_city, stripe_address_country, stripe_address_line1, stripe_address_line1_check, stripe_address_line2, stripe_address_zip, stripe_address_zip_check, stripe_country, stripe_fingerprint, stripe_cvc_check, stripe_last4, stripe_exp_month, stripe_exp_year, stripe_type) VALUES
after a quick look at this module, it does not appear to be using that field stripe_object any more.
from admin -> tools -> install sql patches; you can run the following SQL command which i think will fix your problem:
good luck!Code:ALTER TABLE stripe_data
CHANGE stripe_object stripe_object varchar(64) NULL DEFAULT '';
Hi, thanks for your help. Tried but it still generates an error, this time different:
PHP Fatal error: 1366:Incorrect integer value: '' for column 'stripe_fee' at row 1 :: INSERT INTO stripe_data .......
I had a read about and wondering if this could be the cause of my problem. It relates to another software, but sintoms seem to be the same:
I’ve recently been working on a few of our older websites with newer MySQL installations and am coming across the following error:
SQLSTATE[HY000]: General error: 1364 Field 'delivery_address_id' doesn't have a default value
This is caused by MySQL having a strict mode set which won’t allow INSERT or UPDATE commands with empty fields where the schema doesn’t have a default value set.
https://www.euperia.com/development/...ult-value/1509