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

Stripe.com payment integration module

Views: 234,115

Results 21 to 40 of 680
11 Mar 2013, 7:47 PM
#21
cathead2012 avatar

cathead2012

New Zenner

Join Date:
Aug 2012
Posts:
11
Plugin Contributions:
0

Stripe.com payment integration module

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:

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.

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?

4 Apr 2013, 4:04 PM
#22
energie9 avatar

energie9

New Zenner

Join Date:
Mar 2012
Posts:
4
Plugin Contributions:
0

Re: Stripe.com payment integration module

cathead2012:

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?

Having the same issue.... Anyone figure it out?

5 Apr 2013, 1:03 AM
#23
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Stripe.com payment integration module

Probably best to ask the module's author.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Apr 2013, 6:03 PM
#24
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: Stripe.com payment integration module

The problem i am having is that the module is passing the shipping zipcode to stripe and the payment is failing.

Thanks,
KWW

9 Apr 2013, 8:41 AM
#25
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

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

9 Apr 2013, 8:48 AM
#26
sakwoya avatar

sakwoya

New Zenner

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

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

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

9 Apr 2013, 9:01 AM
#27
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

midreal:

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

		##################### 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 ###############
9 Apr 2013, 9:05 AM
#28
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

keystonewebworks:

The problem i am having is that the module is passing the shipping zipcode to stripe and the payment is failing.

Hi
This is fixed in the 1.3 download (we'd forgotten to correct this in the Zencart module) my apologies

9 Apr 2013, 9:06 AM
#29
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

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

9 Apr 2013, 9:19 AM
#30
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

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

28 Apr 2013, 5:28 AM
#31
fretsbr549 avatar

fretsbr549

New Zenner

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

Re: Stripe.com payment integration module

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.

28 Apr 2013, 5:39 AM
#32
fretsbr549 avatar

fretsbr549

New Zenner

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

Re: Stripe.com payment integration module

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.php?main_page=checkout_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.

28 Apr 2013, 2:42 PM
#33
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

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

28 Apr 2013, 11:10 PM
#34
fretsbr549 avatar

fretsbr549

New Zenner

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

Re: Stripe.com payment integration module

sakwoya:

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.

1 May 2013, 7:41 PM
#35
pablo avatar

pablo

New Zenner

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

Re: Stripe.com payment integration module

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.

2 May 2013, 7:24 AM
#36
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

Pablo:

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

2 May 2013, 2:48 PM
#37
pablo avatar

pablo

New Zenner

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

Re: Stripe.com payment integration module

sakwoya:

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

I am using version 1.11.0 of Fast and Easy Checkout and although it says it for Zen Cart v 1.50, I am using Zen Cart v 1.39h.

2 May 2013, 10:04 PM
#38
sakwoya avatar

sakwoya

New Zenner

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

Re: Stripe.com payment integration module

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 (https://www.yourdomain.com/index.php?main_page=checkout&fecaction=null) - when you click 'confirm order' on that page it sends you to https://www.yourdomain.com/index.php?main_page=fec_confirmation&fecaction=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

2 May 2013, 10:32 PM
#39
pablo avatar

pablo

New Zenner

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

Re: Stripe.com payment integration module

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

11 May 2013, 2:22 AM
#40
filmgirl avatar

filmgirl

New Zenner

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

Re: Stripe.com payment integration module

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:

($order->info['total']) * 100

to look like this:

floor(($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.

I hope this is both right and works for anyone else trying to use the salemaker. :D