Community Add-Ons
Module de paiement PostFinance (Suisse)
for osCommerce Online Merchant v2.2
Ce module permet à vos client d'effectuer les paiements avec leur Postcard, à utiliser uniquement en Suisse :)
PostFinance has recently changed the hash value calculation after they renamed their product PostFinance Debit Direct to PostFinance Postcard.
It no longer uses the shop ID, but the master shop ID. I've updated the relevant code and uploaded the complete package from v3.2
Users that registered before the change from Debit Direct to Postcard MUST NOT UPGRADE to v3.3, because their hash value will continue to be calculated with the Shop ID!
This is the Complete package with the change of Nick Weisser (thank you ;-).
Changes :
1. the txtHistoryBack fix has been added to the full package
2. readme_urls_error_handling has been updated
Bye
[ASULIS]
I recently found out about the txtHistoryBack parameter which prevents PostFinance to call the history.back() JavaScript function and avoids having to change the form action in checkout_confirmation.php from POST to GET.
I've uploaded an updated version of the postfinance.php file that adds txtHistoryBack set to false. Please use the language files from older versions of this contribution.
Just upload all new files and install it in your store's admin section. To get the URLs right that have to be sent to PostFinance, please refer to ASULIS' readme file, but don't forget to NOT tweak the checkkout_confirmation.php file as suggested. It is no longer necessary and by the way incompatible with other payment modules!
This is the Complete package. Changes :
1. readme_urls_error_handling has been updated and set in html form
2. 2 html file have been created for tests
Bye
[ASULIS]
This is the Complete package.
Changes :
1. readme_urls_error_handling.txt has been updated a little bit
2. and a small bug has been fixed if you are using a different session name as osCsid
Bye
ASULIS
Updated Version with new error handling.
And we still had left an email check for tests that we forgot to remove, this has now been taken away.
Regards
ASULIS
This is the Complete package.
But only readme_urls_error_handling.txt has been changed to give new information on error handling.
Changes are :
4. for inverted comma in hash seeds
5. for html tags in hash seeds
6. for going live from test mod to production mod
Again, follow the readme file till the end carefully, most of the questions are answered in it or in the error handling txt file.
We don't have enough time to support everybody.
Bye
ASULIS
Here again the whole package with the fix of the currency bug we didn't notice before (inversion between currency title and currency code).
FOR AN UPDATE :
HELLO,
=> This readme file is based on the contribution of "29 Dec 2005" to update the multicurrencies part
If you use other currencies such as EUR and USD, you have to do the following, as the contribution doesn't work very will with the last new version of yellowpay for these currencies :
- backup the files and save in a separate text file your yellowpay infos in the admin (for copy/paste after)
- then uninstall the postfinance module from the admin side
- then replace the "includes/modules/payment/postfinance.php" with the new one
- install the new one from the admin side
- reset reset the your yellowpay infos in the admin from the text file you have juste created before
FOR A NEW INSTALLATION :
/*
$Id: postfinance.php
v 3.0 22/12/2005
Created by : Ex-perience Informatique Delémont
Adapted by : ASULIS
************************************************
This module offers payment via postcard and credit cards using the yellowpay payment module of the swiss post.
Information: This module is free, but please refer to infos@ex-perience.ch everywhere it should be as he did the whole base of this contribution.
**************************************************************
This new version is based on the POSTFINANCE contrution of dj-smoye's/ex-perience :
- allow call in right language depending on navagitation language (french=4108, english=2057, italian=2064, german=2055) or use the default admin language that has been set
- allow to use the navigation currency if not special is set in the admin
- added fields to define different hash seeds and shop-ids on the amdin side as well as the test and production mod
- ...
IMPORTANT NOTICE for existing users of this contribution :
- all has been updated to allow direct call of the yellowpay window from checkout_confirmation.php
- this helps to remove the calling page postfinance_process.php
- for this, the following line has been added in checkout_confirmation.php for get mod :
if(!isset($HTTP_GET_VARS['isingetmod'])) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'isingetmod=1', 'SSL'));} // add it BEFORE : require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
- and the following line to include all needed parameters
if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) {echo $payment_modules->process_button();} // add it AFTER : echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
**************************************************************
Copyright (c) 2002 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com
Released under the GNU General Public License
*/
******** Installation **********
1. Extract the files into your OsCommerce folder.
2. ADD the following line in checkout_confirmation.php (recall in get mod) :
// add it BEFORE : require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
if(!isset($HTTP_GET_VARS['isingetmod'])) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'isingetmod=1', 'SSL'));}
3. ADD the following line in checkout_confirmation.php (include hidden parameters) :
// add it AFTER : echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) {echo $payment_modules->process_button();}
4. open includes/modules/payment/postfinance.php and choose your admin language.
5. activate the module in the admin interface
6. modify the settings for your Postfinance account (account, shop-ids and txt-hashes for each currencies)
7. after tests contact postfinance for production mod and change from test mod to production mod in the admin interface
******** END Installation **********
ALL THE BEST !
FOR URLS AND ERROR HANDLING :
HELLO,
FIRST LOOK AT THE NEWINSTALL OR UPDATE DIRECTORIES IF YOU HAVE TO MAKE A NEW INSTALL OR TO UPDATE THE CONTRIBUTION FOR MULTICURRENCIES
This :
1. gives examples of the URLs to use for succes, fail, abort and order validation
2. gives a small tip for the Referrer check when going in production
3. helps you if you have problems by calling the yellowpay module
1.
We have had many questions from poeople using this module, but having problem to set the right URLS in Yellowpay.
Here Here again the URLS you have to set in yellowpay :
Success :
http://www.yoursite.com/checkout_success.php?step=ok
Failed :
http://www.yoursite.com/checkout_confirmation.php?step=fail
or
http://www.yoursite.com/checkout_payment.php?step=fail
Abord :
http://www.yoursite.com/checkout_confirmation.php?step=back
or
http://www.yoursite.com/checkout_payment.php?step=back
Para.1 (important set the URL/HTTP mode in primary choice not email):
http://www.yoursite.com/checkout_process.php?step=process
You can change theses URLS in your yellowpay backoffice, if you allow electronic mutations. Else, you have to do it in postal way.
2.
Af you have a problem by going live in production, sometimes you have to desactivate the Referrer Check, we have had once the problem.
3.
If you have a "00" error, it's always hard to find out without looking at your pages, but try :
3a.
first check if you really call the yellowpay module in POST mode in checkout_confirmation.php, example :
<form name="checkout_confirmation" action="https://yellowpay.postfinance.ch/checkout/Yellowpay.aspx?userctrl=Invisible" method="post" onSubmit="return true">
<input type="hidden" name="txtShopID" value="">
<input type="hidden" name="txtShopPara" value="osCsid=dccfc1fedb1eb59ff268159372ddf919">
<input type="hidden" name="txtOrderTotal" value="1.00">
<input type="hidden" name="txtLangVersion" value="4108">
<input type="hidden" name="txtArtCurrency" value="CHF">
<input type="hidden" name="txtHash" value="2eec74b9ed68543eed63e587e4fbd429">
<input type="hidden" name="txtOrderIDShop" value="">
<input type="hidden" name="txtBLastName" value="">
<input type="hidden" name="txtBFirstName" value="">
<input type="hidden" name="txtBAddr1" value="">
<input type="hidden" name="txtBZipCode" value="">
<input type="hidden" name="txtBCity" value="">
<input type="hidden" name="txtBTel" value="">
<input type="hidden" name="txtBEmail" value="">
<input type="submit" name="button_confirm" value="submit">
</form>
3b.
check the values you have to set in the admin (hash seed + id shop).
Modify this and try first in CHF with the correct values so that the txtHash is set right, it's often the main error.
3c.
This (3b.) has to be done for CHF for each currency.
Then if you use other currencies such as EUR and USD, you have to do the following, as the contribution doesn't work very will with the last new version of yellowpay for these currencies :
=> LOOK at the DIRECTORY UPDATE
Kindest regards and ALL THE BEST !
ASULIS
FOR AN UPDATE :
HELLO,
=> This readme file is based on the contribution of "29 Dec 2005" to update the multicurrencies part
If you use other currencies such as EUR and USD, you have to do the following, as the contribution doesn't work very will with the last new version of yellowpay for these currencies :
- backup the files and save in a separate text file your yellowpay infos in the admin (for copy/paste after)
- then uninstall the postfinance module from the admin side
- then replace the "includes/modules/payment/postfinance.php" with the new one
- install the new one from the admin side
- reset reset the your yellowpay infos in the admin from the text file you have juste created before
FOR A NEW INSTALLATION :
/*
$Id: postfinance.php
v 3.0 22/12/2005
Created by : Ex-perience Informatique Delémont
Adapted by : ASULIS
************************************************
This module offers payment via postcard and credit cards using the yellowpay payment module of the swiss post.
Information: This module is free, but please refer to infos@ex-perience.ch everywhere it should be as he did the whole base of this contribution.
**************************************************************
This new version is based on the POSTFINANCE contrution of dj-smoye's/ex-perience :
- allow call in right language depending on navagitation language (french=4108, english=2057, italian=2064, german=2055) or use the default admin language that has been set
- allow to use the navigation currency if not special is set in the admin
- added fields to define different hash seeds and shop-ids on the amdin side as well as the test and production mod
- ...
IMPORTANT NOTICE for existing users of this contribution :
- all has been updated to allow direct call of the yellowpay window from checkout_confirmation.php
- this helps to remove the calling page postfinance_process.php
- for this, the following line has been added in checkout_confirmation.php for get mod :
if(!isset($HTTP_GET_VARS['isingetmod'])) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'isingetmod=1', 'SSL'));} // add it BEFORE : require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
- and the following line to include all needed parameters
if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) {echo $payment_modules->process_button();} // add it AFTER : echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
**************************************************************
Copyright (c) 2002 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com
Released under the GNU General Public License
*/
******** Installation **********
1. Extract the files into your OsCommerce folder.
2. ADD the following line in checkout_confirmation.php (recall in get mod) :
// add it BEFORE : require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
if(!isset($HTTP_GET_VARS['isingetmod'])) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'isingetmod=1', 'SSL'));}
3. ADD the following line in checkout_confirmation.php (include hidden parameters) :
// add it AFTER : echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) {echo $payment_modules->process_button();}
4. open includes/modules/payment/postfinance.php and choose your admin language.
5. activate the module in the admin interface
6. modify the settings for your Postfinance account (account, shop-ids and txt-hashes for each currencies)
7. after tests contact postfinance for production mod and change from test mod to production mod in the admin interface
******** END Installation **********
ALL THE BEST !
FOR URLS AND ERROR HANDLING :
HELLO,
FIRST LOOK AT THE NEWINSTALL OR UPDATE DIRECTORIES IF YOU HAVE TO MAKE A NEW INSTALL OR TO UPDATE THE CONTRIBUTION FOR MULTICURRENCIES
This :
1. gives examples of the URLs to use for succes, fail, abort and order validation
2. gives a small tip for the Referrer check when going in production
3. helps you if you have problems by calling the yellowpay module
1.
We have had many questions from poeople using this module, but having problem to set the right URLS in Yellowpay.
Here Here again the URLS you have to set in yellowpay :
Success :
http://www.yoursite.com/checkout_success.php?step=ok
Failed :
http://www.yoursite.com/checkout_confirmation.php?step=fail
or
http://www.yoursite.com/checkout_payment.php?step=fail
Abord :
http://www.yoursite.com/checkout_confirmation.php?step=back
or
http://www.yoursite.com/checkout_payment.php?step=back
Para.1 (important set the URL/HTTP mode in primary choice not email):
http://www.yoursite.com/checkout_process.php?step=process
You can change theses URLS in your yellowpay backoffice, if you allow electronic mutations. Else, you have to do it in postal way.
2.
Af you have a problem by going live in production, sometimes you have to desactivate the Referrer Check, we have had once the problem.
3.
If you have a "00" error, it's always hard to find out without looking at your pages, but try :
3a.
first check if you really call the yellowpay module in POST mode in checkout_confirmation.php, example :
<form name="checkout_confirmation" action="https://yellowpay.postfinance.ch/checkout/Yellowpay.aspx?userctrl=Invisible" method="post" onSubmit="return true">
<input type="hidden" name="txtShopID" value="">
<input type="hidden" name="txtShopPara" value="osCsid=dccfc1fedb1eb59ff268159372ddf919">
<input type="hidden" name="txtOrderTotal" value="1.00">
<input type="hidden" name="txtLangVersion" value="4108">
<input type="hidden" name="txtArtCurrency" value="CHF">
<input type="hidden" name="txtHash" value="2eec74b9ed68543eed63e587e4fbd429">
<input type="hidden" name="txtOrderIDShop" value="">
<input type="hidden" name="txtBLastName" value="">
<input type="hidden" name="txtBFirstName" value="">
<input type="hidden" name="txtBAddr1" value="">
<input type="hidden" name="txtBZipCode" value="">
<input type="hidden" name="txtBCity" value="">
<input type="hidden" name="txtBTel" value="">
<input type="hidden" name="txtBEmail" value="">
<input type="submit" name="button_confirm" value="submit">
</form>
3b.
check the values you have to set in the admin (hash seed + id shop).
Modify this and try first in CHF with the correct values so that the txtHash is set right, it's often the main error.
3c.
This (3b.) has to be done for CHF for each currency.
Then if you use other currencies such as EUR and USD, you have to do the following, as the contribution doesn't work very will with the last new version of yellowpay for these currencies :
=> LOOK at the DIRECTORY UPDATE
Kindest regards and ALL THE BEST !
ASULIS
This module offers payment via postcard and credit cards using the yellowpay payment module of the swiss post.
Information: This module is free, but please refer to infos@ex-perience.ch everywhere it should be as he did the whole base of this contribution.
This new version is based on the POSTFINANCE contrution of dj-smoye's/ex-perience :
- allow call in right language depending on navagitation language (french=4108, english=2057, italian=2064, german=2055) or use the default admin language that has been set
- allow to use the navigation currency if not special is set in the admin
- added fields to define different hash seeds and shop-ids on the amdin side as well as the test and production mod
- ...
IMPORTANT NOTICE for existing users of this contribution :
- all has been updated to allow direct call of the yellowpay window from checkout_confirmation.php
- this helps to remove the calling page postfinance_process.php
- for this, the following line has been added in checkout_confirmation.php for get mod :
if(!isset($HTTP_GET_VARS['isingetmod'])) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'isingetmod=1', 'SSL'));} // add it BEFORE : require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
- and the following line to include all needed parameters
if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) {echo $payment_modules->process_button();} // add it AFTER : echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
ALL THE BEST !
Pour ceux qui désirent utiliser le module ne télécharger rien sur cette page mais envoyez-moi un mail pour obtenir la version actuelle.
If you need use this contribution please dont download here but send me a mail.
If you find the last version download this: http://www.oscommerce.com/community/contributions,1233/download,4353/mirror,sunsite
Here you can download the complete Version of the Postfinance payment module. French, German and English are supported.
- Including a small Readme FIX!!!
Version qui tourne sous 2.2 ms2
Version 2 pour Osc MS2
Un nouveau module PostFinance est disponible et sera mis prochainement à disposition une fois qu'il sera testé par PostFinance. Pour tout renseignement me contacter par mail.
This module permit to swiss customers to pay with the Postcard or credit card (depend on the contract with postfinance).
this is an update for use of postfinance on the latest snapshot of oscommerce.
Thank's to Pino Calzo who did the hack and to e-xperience for the original mod...
Mise à jour du module postfinance avec correction des bugs.
A installer à la place de l'ancienne version.
Dans le readme se trouvent les informations pour tester ce module sur notre site.
Ce module permet à vos client d'effectuer les paiements avec leur Postcard, à utiliser uniquement en Suisse :)
