Jump to content
Sign in to follow this  
Pursuant

Offline Credit Card Module RC2

Recommended Posts

This is outdated! Please consider the latest release at http://www.prestashop.com/forum/index.php/topic,2267.0.html

 

It's here! Offline Credit Card Module Release Candidate 2 is now available. PLEASE test it, see how it works. Make suggestions! I am very proud to be developing a module that has been wanted by this community for so long, and I want it to be the best!

 

It's completely done, except for one thing which I can not seem to get to work: Persistence of credit card information through validation failure. If anyone can help with that, it would be great!

 

Administrators and Developers: Please leave feedback. Any feedback is welcome!

creditcard.zip

Share this post


Link to post
Share on other sites

Well, I have just tried and the unencrypted string looks like this : ᄒdPvᅢUナ  ...

 

Have fun ;)

 

Share this post


Link to post
Share on other sites

Well, I have just tried and the unencrypted string looks like this : ᄒdPvᅢUナ  ...

 

Question: Are you using special characters in the name/credit card number/expiration date fields?

 

When you install it, you must configure the encryption string by clicking "CreditCard      >> Configure" in the modules section of the back office.  Enter a 16 digit string (ie "prestashop1sd645") which will be used for encryption. Click "submit" and it will be set. When you use crypt.php, enter that same key into the "key" section of the decryption form and it should work just fine...

I have had no problems decrypting when I use the correct encryption string.

 

(By the way, a simple installation/operation guide can be found in http://yourshop/modules/creditcard/readme.txt)

 

For example. If I set an encryption key (in this test it is "kevinklika123456") for the module and a sale goes through, I get the encrypted string:

 

N7iPktxvhFAWL/WDXQ+C8d1bXS4whg5koLEIfWf64t4oNvRb+hP2OJWEpuDRM3CqZ5aLaRy1vF7vFNKIyUMqHD/8Z1SV5WH2rtfNwq0wusPYSx4TxDhkdytTNO6unjZv

 

when I enter that into crypt.php without entering the encryption key, I get:

 

ᅵᄋNロ/A*=ᅥᄁ8ᄒrヨᅧF ムᅬ-￉ᅮᆭラᄆ

 

(obviously not the correct string) but, if I enter the correct key that I set in the configuration, I get:

 

Name: Kevin David Klika Card Number: 4111111111111111 Card Exp: 05 - 2008

 

So, make sure that encryption key is set! 16 characters!

Share this post


Link to post
Share on other sites

Hi Ox40 !

 

Your module is really useful.

Moreover it is well planned and perfectly usable.

 

However I found a little bug.

Once payment is made (last stage) if you go back and then you go on the last page, you get this error bug:

Notice: Hex number is too big: 0x0100000000 in E:wwwprestashop_1.0.0.2prestashopmodulescreditcardencryption.php on line 64

Notice: Hex number is too big: 0x0100000000 in E:wwwprestashop_1.0.0.2prestashopmodulescreditcardencryption.php on line 65

Notice: Hex number is too big: 0x0100000000 in E:wwwprestashop_1.0.0.2prestashopmodulescreditcardencryption.php on line 66

An order has already been placed using this cart

 

I translated the module in french ... Translation below

fr.php

Share this post


Link to post
Share on other sites

Thanks very much for your reply Ludo, and thanks for the supportive comments! :) I'm trying my best. I still hope to make this module even better as I learn the inner workings of prestashop.

 

* I actually went through and made it even more organized. Hopefully it helps! *

 

As for the bug, what version of prestashop are you using? I am using v1RC2 and I only get the message "An order has already been placed with this cart".  :- It looks like you are using RC2 as well (by the path in your post). It seems that the bug is caused at this part during the encryption routine:

$z = ($z+0x0100000000-(((($y<<4)^($y>>5))+($y^$sum)+$k[($sum>>11)&3])&0x0ffffffff))&0x0ffffffff;

$sum=($sum+0x0100000000-$d)&0x0ffffffff;

$y = ($y+0x0100000000-(((($z<<4)^($z>>5))+($z^$sum)+$k[$sum&3])&0x0ffffffff))&0x0ffffffff;

But, the order is placed alright the first time? I'm not sure what to do, because I can not reproduce this error. It might be because of the French characters, but does it submit the order alright?

 

I have been working again all night on this, and have made some major improvements. Stable version 1 is coming along nicely!

 

Also, thank you VERY much for your translation! I found a couple of errors in my English and some misnamed fields, and I also added some fields. Do you think you could help me when I release v1 to get a French translation including those new phrases?

 

Thanks so much for your help!

Share this post


Link to post
Share on other sites

Ox40,

 

I have ever done all of this (read the doc, set the key...).

I have also tried to use "your" credit card number and the only thing the crypt.php script returns is something like ᄒdPvᅢUナ...

 

For now I am waiting for the final release... ;)

Share this post


Link to post
Share on other sites

It must be a problem with the encryption and non-english characters. Is your encryption key only standard a-Z0-9 characters? (By the way, 4 with 15 1's after it is a sample number that passes validation.) What version of Prestashop are you using? I will quick write some sample code today (in about two hours) to make sure the problem is not the Javascript decryption vs PHP encryption. Thanks for testing for me! I hope I can get this problem solved for you.

Share this post


Link to post
Share on other sites

Hello Ox40 !

 

It is realy a pleasure to help you !

I look forward your final version.

Absolutly... I can help you to make all the next French translation.

 

Have you plan to work on a Online Credit Card Module ?

 

 

Share this post


Link to post
Share on other sites

Eventually I might work on an online gateway - but I need to do more research about security requirements etc. So yeah, probably. And I won't charge $300+ like the advanced PS team. (Not that it isn't worth it!)

Share this post


Link to post
Share on other sites

If you created usable online credit card module, it would be honour for me to send you donation ;-)

Share this post


Link to post
Share on other sites

Please OX40 can you verify and test your module in rc3 (url trouble)

Share this post


Link to post
Share on other sites

Sorry for the late release of the CC module, I am working on the latest release (which coincidentally is named RC3) :) . I have added many features - and have just a little more to do before it is fully operational. I will release some more information here in the very near future.

 

(I assume you are talking about the http://website.something/anothore/website.something/another/modules/creditcard/payment.php issue... ? )

 

--Kevin

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More