Contributions
pm2checkout
Mod to take out the credit card details for the 2checkout payment gateway
If you have a look at the files then it should be easy enough to do the changes for other gateways
This mod works for the latest snapshot catalog-20030119
Expand All / Collapse All
- fixed the currency problem so that if your shop uses multiple currencies it will direct to
the currency "in use" when going to 2checkout rather then always defaulting to the US payment version.
Added the non-standard street-address2 parameter which pre-populates the suburb. also a couple of notes around customisations - like removing the shipping step from 2CO, and setting the state to = "Outside USA and Canada" for non-Americans.
Changes:
-shipping cost is passed to 2CO
-changed 'price' variable to 'final_price'
-c_description is passed properly, minues HTML tags. Length under 255 chars
goes into short description, 255+ goes into long description.
-added credit card logos on checkout a'la Paypal IPN
-added instructions on enabling/disabling itemized cart
Changes:
-fixed typo so c_name, c_price, and c_description work properly (AGAIN)
-implemented suggestions by Eric Webster @ 2CO
I must first say great work everyone! Attached ate some comments I have after reviewing your module. To me, it looks like the module will work as is, but my comments might help you make a the integration even better.
Changes:
-fixed typo so c_name, c_price, and c_description work properly
-updated test credit card info
pm2checkout V2.0a revised March 29th, 2005 by Alex Seto (me@alexseto.com)
------------------------------------------------------------------------
Changes:
-implemented c_prod and id_type parameters as required by 2CO
-products purchased are auto-added to 2co's product listing (except product
description)
-added option for non-tangible goods
These changes will allow pm2checkout to work with version 2. This will NOT work
if you use a shared-SSL certificate, since you need to force cookie use.
pm2checkout V2.0 revised March 28th, 2005 by Alex Seto (me@alexseto.com)
------------------------------------------------------------------------
Changes:
-fixed demo mode to send 'Y' for ON or blank for OFF
-improved instructions, including how to force cookie use (thanks IlColosso!)
-added line to remove extraneous buttons from the 2checkout cart (“Save
Changes” button, quantity selector data field, “Continue Shopping” button)
These changes will allow pm2checkout to work with version 2. This will NOT work
if you use a shared-SSL certificate, since you need to force cookie use.
Small bug in the multiple currency contribution below. It is stuck in demo mode. I don't know how to fix it correctly, but it works if you replace line 108:
tep_draw_hidden_field('DEMO', ((MODULE_PAYMENT_2CHECKOUT_TESTMODE == 'Test') ? 'Y' : 'N')) .
with :
tep_draw_hidden_field('x_test_request', ((MODULE_PAYMENT_2CHECKOUT_TESTMODE == 'Test') ? 'Y' : 'N')) .
With the first line you are stuck in demo mode, the second you are stuck in production.
Perhaps someone who knows how to write PHP can fix it so it can be changed through admin?
Modified:
catalog/includes/modules/payment/pm2checkout.php
- remarked out the portion that converts customers selected currency to US funds
- added line 125 to pass 2checkout the customers currency of choice.
This will cause 2checkout to add 1 additional step to the customers checkout process. The payment funds will be in the currency the customer chose on your website, and the first screen they see will give them the option to change their currency.
Modified August 24/2004
-Added some instructions
Hopefully, someone will eventually fix things so that if your Shop currency is other than USD, you can change
your acceptance currency in 2checkout to whatever you want to accept.
Originally Posted By DJ in this thread: http://forums.oscommerce.com/index.php?showtopic=86261&st=80
Hopefully this will fix everyones problems with 2Checkout returning to your OSCommerce cart and clearing up the in cart items.
It seemed to work for me, in receiving orders except you still must set
2checkout to only accept US dollars. Hopefully someone can work out that bug.
Anyway, good luck, and hopefully the research will continue on this mod.
The hash checking that was working a few days ago is broken. So it has been commented out. Failed hash checking has the bad effect of charging the card and not registering the order on the system.
This is very bad for customers who do not bother to contact you and find a charge on their statement and hence very bad for you.
So no hash checking. You MUST verify all orders on the 2checkout system to ensure that the funds were realized.
http://www.rayservers.com/
This is a workaround for the new 2checkout. With kind help from the forum thread:
http://forums.oscommerce.com/index.php?showtopic=86261&view=findpost&p=360933
this was put together.
Please read the install file for directions. Remember to uninstall your current module from admin before installing the update.
Do check us out http://www.rayserver.com/ for contact info. We sell secure laptops.
Added an option to complete an MD5 hash verification against the secret word from 2checkout for any payment before being added to the database.
This option is turned off by default so only awared administrators can be use it.
More details about MD5 hash facility at: http://www.support.2checkout.com/deskpro/faq.php?article=277
I use the md5 hash verification at www.osCoders.biz without any problems. I decided to use the md5 hash verification after some fake payment attempts I received.
Good Luck
There was a bug in the previous version. Please replace that version with this version
Changes - When USD was chosen it was sending the value throught as the default shop currency this is fixed.
- Changed the payment information message to hopefully be more descriptive
This is a similar modification to the pm2checkout as Dave Wilks Contributed for the snapshot catalog-20030119.
It will change the pm2checkout module so it doesn't request credit card details till you reach the 2checkout website.
The release for this is based off the code in the snapshot 20030611. This should be the same as MS2 due to be released in a few days.
Cor customers using other default currencys it will convert their cart total to US dollars before submitting to 2checkout.
This will display a message telling the customer that there cart figure is being converted to US dollars when they goto the 2checkout payment gateway.
Install:
BACKUP BACKUP BACKUP
replace both files retaining the structure
Mod to take out the credit card details for the 2checkout payment gateway
If you have a look at the files then it should be easy enough to do the changes for other gateways
This mod works for the latest snapshot catalog-20030119
Note: Contributions are used at own risk.