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

Stripe.com payment integration module

Results 1 to 20 of 679
27 Nov 2012, 12:17
#2
lilmike avatar

lilmike

New Zenner

Join Date:
May 2012
Posts:
3
Plugin Contributions:
0

Re: Stripe.com payment integration module

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.
27 Nov 2012, 12:53
#3
sakwoya avatar

sakwoya

New Zenner

Join Date:
Jan 2004
Posts:
26
Plugin Contributions:
2

Re: Stripe.com payment integration module

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:
		//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>';
		  }


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:

// $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

		//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>';
		  }


That's probably the easiest way of editing out the <noscript> for the moment.

Apologies for my oversight

Graeme
16 Dec 2012, 18:15
#4
filmgirl avatar

filmgirl

New Zenner

Join Date:
Dec 2012
Posts:
5
Plugin Contributions:
0

Re: Stripe.com payment integration module

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
18 Dec 2012, 17:57
#5
sakwoya avatar

sakwoya

New Zenner

Join Date:
Jan 2004
Posts:
26
Plugin Contributions:
2

Re: Stripe.com payment integration module

filmgirl:

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


Hi there
It'll take a bit of sorting out as it changes a few bits in the code - I'll have a look at it but it will probably be early 2013 before it's ready as I fully intend to have some time off over Christmas :-)
Graeme
18 Dec 2012, 17:59
#6
filmgirl avatar

filmgirl

New Zenner

Join Date:
Dec 2012
Posts:
5
Plugin Contributions:
0

Re: Stripe.com payment integration module

sakwoya:

Hi there
It'll take a bit of sorting out as it changes a few bits in the code - I'll have a look at it but it will probably be early 2013 before it's ready as I fully intend to have some time off over Christmas :-)
Graeme


Not a problem at all. :D Thank you for looking into it.
25 Dec 2012, 06:25
#7
tux_rules avatar

tux_rules

New Zenner

Join Date:
Dec 2012
Posts:
1
Plugin Contributions:
0

Re: Stripe.com payment integration module

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???
28 Dec 2012, 17:26
#8
cisur avatar

cisur

New Zenner

Join Date:
Dec 2012
Posts:
1
Plugin Contributions:
0

Re: Stripe.com payment integration module

Tux_Rules:

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???


You have to copy content of unzipped_module/includes/* to your /(storename)/includes/*
09 Jan 2013, 05:07
#9
midreal avatar

midreal

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: Stripe.com payment integration module

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
10 Jan 2013, 14:57
#10
wallstickys avatar

wallstickys

New Zenner

Join Date:
Jan 2013
Posts:
1
Plugin Contributions:
0

Re: Stripe.com payment integration module

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:

"amount" => ($order->info['total']) * 100, // amount in cents


I added the round function to the calculation and it seems to have corrected the issue:

"amount" => round($order->info['total'], 2) * 100, // amount in cents


Please note there are several instances where this line needs to be changed.

Other than that - everything seems to be working fine! Thanks so much!

James
15 Jan 2013, 23:43
#11
midreal avatar

midreal

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: Stripe.com payment integration module

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
16 Jan 2013, 22:51
#12
midreal avatar

midreal

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: Stripe.com payment integration module

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---
16 Jan 2013, 23:10
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Stripe.com payment integration module

Do you have people actually complaining that they're confused by the month being displayed?
17 Jan 2013, 16:26
#14
midreal avatar

midreal

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: Stripe.com payment integration module

DrByte:

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.
17 Jan 2013, 18:47
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Stripe.com payment integration module

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.
17 Jan 2013, 21:46
#16
midreal avatar

midreal

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: Stripe.com payment integration module

DrByte:

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:

$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' => ''


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).
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.

 </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>


I will try and look into it a little later and if I find a solution I will post.
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!
23 Jan 2013, 19:57
#17
midreal avatar

midreal

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: Stripe.com payment integration module

WallStickys:

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:

"amount" => ($order->info['total']) * 100, // amount in cents


I added the round function to the calculation and it seems to have corrected the issue:

"amount" => round($order->info['total'], 2) * 100, // amount in cents


Please note there are several instances where this line needs to be changed.

Other than that - everything seems to be working fine! Thanks so much!

James


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.
11 Feb 2013, 03:31
#18
cubbie avatar

cubbie

New Zenner

Join Date:
Jul 2012
Posts:
3
Plugin Contributions:
0

Re: Stripe.com payment integration module

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:

[PHP] 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>');[/PHP]

in /includes/modules/payment/stripepay.php I have the following in lines 23 to 29 (give or take a few lines)

[PHP] $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);[/PHP]

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.
11 Feb 2013, 03:46
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Stripe.com payment integration module

cubbie:

Is it possible to display credit card images during Step 2 of 3 for Stripepay checkout?

Simple: turn on the credit card images in Admin->Configuration->Credit Cards, and upload appropriate images to your server once you've confirmed that you have copyright permission to display said images on your site.

No programming required.
11 Feb 2013, 22:55
#20
cubbie avatar

cubbie

New Zenner

Join Date:
Jul 2012
Posts:
3
Plugin Contributions:
0

Re: Stripe.com payment integration module

DrByte:

Simple: turn on the credit card images in Admin->Configuration->Credit Cards, and upload appropriate images to your server once you've confirmed that you have copyright permission to display said images on your site.

No programming required.


Thanks. That was painless.