PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

Offline Credit Card Module (new version 3.01.production)

413 replies to this topic
#1
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
The version mentioned in this thread is OUTDATED and has been REPLACED by version 3.01.production. Please see http://www.prestasho..._dot_production for the new module

Offline Credit Card Module
This module allows current business owners with their own means of+ credit card processing the ability to receive credit card information from their online customers and process it offline via their own system. It does not do any processing itself!

Current version is v2.0.5, it is attached to this post.

To install this module, extract it's contents to /yourPrestaDir/modules/
Then go to your Back Office -> Modules -> Offline Credit Card Module [Install]

Attached Files


Pursuant Solutions, programmers dedicated to the pursuit.

#2
coke

    PrestaShop Apprentice

  • Members
  • PipPip
  • 62 posts
This is actually really useful.

Some requests for the next version:
- double check to make sure the credit card number is the right # of digits and starts with the correct 2 numbers.
- ask for type of CC
- extra security?

#3
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
Ok. I redid the storage method to use a dedicated database table already, v2.0 uses it fully. The CC number is checked with mod10 check digit, but yes, I can make an option to ask for type of card. What do you mean by extra security?
Pursuant Solutions, programmers dedicated to the pursuit.

#4
coke

    PrestaShop Apprentice

  • Members
  • PipPip
  • 62 posts
Where can I download v2.0?

#5
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
It will be released on Thursday night/Friday morning. I have to finish up those few things that you requested. Any other requests for v2.0?
Pursuant Solutions, programmers dedicated to the pursuit.

#6
coke

    PrestaShop Apprentice

  • Members
  • PipPip
  • 62 posts
Not as of right now =]
Thanks for your effort, its a lovely module.

#7
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
I've been trying my best. Also, CVC will be an optional field, and there will be a help-bubble for people who don't know what a CVC number is. Along with the ability to select a card issuer and a check for the first digits.
Pursuant Solutions, programmers dedicated to the pursuit.

#8
junnecito

    PrestaShop Fanatic

  • Moderators
  • 1193 posts
Hi Ox40:
In the moment you have the v2.0 I will traslate it to Spanish

#9
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
I have just uploaded version 2.0.1 of the Offline Credit Card Module. Improvements include:

#) Dedicated Database Table for Data Storage

#) Improved Code Design / Structure

#) Comments galore

#) Ability to require / not require a CVC number


Version 2.0.2 (due out soon) will include the following:

#) CVC Explanation

#) Card Type Selection (if time allows)

#) Ability to accept specific types of cards (if time allows)
Pursuant Solutions, programmers dedicated to the pursuit.

#10
junnecito

    PrestaShop Fanatic

  • Moderators
  • 1193 posts
Hi Ox40:
This module can be use with Spanish bank's?
Please let me know to do the translat.
Thanks

#11
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
It is offline, meaning you need some other form of CC processing to complete the transaction. This just stores the information in a database so you can charge it out later.

--Kevin
Pursuant Solutions, programmers dedicated to the pursuit.

#12
junnecito

    PrestaShop Fanatic

  • Moderators
  • 1193 posts
Thanks Kevin

#13
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
I just uploaded version 2.0.2 of the Offline Credit Card Module.

Notable Improvements:

#) Better server-side validation

#) Client-side validation scripts

#) Easier program flow and design

#) Entry form automatically determines card type based on number

#) CVC Explanation link (popup)



It is available for testing on the first post of this thread.

--Kevin
Pursuant Solutions, programmers dedicated to the pursuit.

#14
junnecito

    PrestaShop Fanatic

  • Moderators
  • 1193 posts
Hi Kevin:
I just install de credid card 2.0.2 that is real the 1.8 and I have this warring.
Please see the attach image.
I want to translate it.
Thanks

Attached Files



#15
junnecito

    PrestaShop Fanatic

  • Moderators
  • 1193 posts
Here you'll find the Kevin credit card module with thw Spanish and French translations.

Attached Files



#16
zephyr242

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
Great module! Just a couple of bugs I found so far...

1) Javascript error on keyup of entering credit card number in IE7 (see function doSetup in functions.js)
2) I downloaded and installed 2.0.2, but shop admin says version is 1.8 still. (see function __construct in creditcard.php)
3) It appears that the module install assumes that CREDIT_CARD_ID_ORDER_STATE value already exists in the configuration table. I would think that the installer should check to see if it exists and use Configuration->_addConfiguration if necessary.

Let me know if you need any help on future implementations of this module. I wouldn't mind helping dig in a bit more...

Thanks,
Matthew

#17
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
1.) Hmm, odd. I will look into this bug. I tested in IE7 and it worked for me. Basically, that image of the CC next to the text box changes to the card issuer's logo once a valid card number is entered and verified. ;)
2.)Yes, I fixed that for the next release, it was an oversight on my part.
3.) Most of the time, a Configuration object does not need to be set, most functions are used with Configuration::functionName(values);. Configuration::updateValue("CREDIT_CARD_ID_ORDER_STATE") updates an existing value, or creates a new one if one does not exist (Line 251 of ps/classes/Configuration.php).

Yes, I would love help with this module. It is pretty much finished, but there is always more that can be added. If you could do me a favor and look through the code for structural mistakes or odd implementations, that would be great. I spend a day at work restructuring the module to make it neater. Turns out, validation.php is not needed, and it only made the job harder! So, everything is in creditcard.php, functions.js and the remaining .tpl files!

Thanks for your help! I will get working on problem 1 immediately.

--Kevin
Pursuant Solutions, programmers dedicated to the pursuit.

#18
jtyana

    PrestaShop Apprentice

  • Members
  • PipPip
  • 158 posts
I've installed 2.0.2 which I downloaded from the first post
Using Prestashop Version 1.0.0.8

It all ran smoothly on a test order until completion of the payment where I get the error "Hack attempt (OrderHistory -> id_order_state is empty)" on the page creditcard/payment.php

#19
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
Hmm, seems to be a recurring theme. I will look into it.
Pursuant Solutions, programmers dedicated to the pursuit.

#20
bykrmom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 102 posts
Hello, I also downloaded the 2.0.2 version and I am running the 1.0.0.5 version of prestashop.

I'm sorry orry to tell you more of the same, but I also ran a test purchase, where all went fine until the end. I recieved the following errors;

Notice: Undefined variable: errName in C:\Inetpub\wwwroot\cart\modules\creditcard\creditcard.php on line 146
Notice: Undefined variable: errNumber in C:\Inetpub\wwwroot\cart\modules\creditcard\creditcard.php on line 146
Notice: Undefined variable: errCVC in C:\Inetpub\wwwroot\cart\modules\creditcard\creditcard.php on line 146
Hack attempt (OrderHistory -> id_order_state is empty)


I'm not good enough with php to understand how to fix the problem. I hope you can help?
"Great Spirits have always encountered violent opposition from Mediocre Minds" `Albert Einstein