Wildorchid Posted January 25, 2006 Share Posted January 25, 2006 (edited) Hello, Has anybody successfully implemented the latest version of Postfinance Payment Module from Asilus, postfinance.php? Postfinance Contribution I have tried to update but have encountered several problems. After manipulating the script a little I have come to the point where the Yellowpay Popup is opened with error and can make the online payment but then the shop is not processing the order. The sucess url at Yellowpay is currently set to checkoutsuccess.php. Maybe I have to change the success url to checkout_process.php? Any ideas. Thanks Edited January 25, 2006 by Wildorchid Quote Link to comment Share on other sites More sharing options...
Scal Posted April 16, 2006 Share Posted April 16, 2006 Hello, Has anybody successfully implemented the latest version of Postfinance Payment Module from Asilus, postfinance.php? Postfinance Contribution I have tried to update but have encountered several problems. After manipulating the script a little I have come to the point where the Yellowpay Popup is opened with error and can make the online payment but then the shop is not processing the order. The sucess url at Yellowpay is currently set to checkoutsuccess.php. Maybe I have to change the success url to checkout_process.php? Any ideas. Thanks I changed some things in modules/payment/postfinance.php I replaced $keys[]='MODULE_PAYMENT_POSTFINANCE_TXT_SHOP_ID_'.$currencies['title']; $keys[]='MODULE_PAYMENT_POSTFINANCE_TEXT_HASH_'.$currencies['title']; $keys[]='MODULE_PAYMENT_POSTFINANCE_SHOP_ID_'.$currencies['title']; by $keys[]='MODULE_PAYMENT_POSTFINANCE_TXT_SHOP_ID_'.$currencies['code']; $keys[]='MODULE_PAYMENT_POSTFINANCE_TEXT_HASH_'.$currencies['code']; $keys[]='MODULE_PAYMENT_POSTFINANCE_SHOP_ID_'.$currencies['code']; because I had wrong values in the form. But it still seems to be more problems. I emailed postfinance to ask them. If this was the problem I'll tell you. Quote Link to comment Share on other sites More sharing options...
chocomoto Posted April 18, 2006 Share Posted April 18, 2006 I got some help with installing the payment module and just received my shop id from Post Finance, but I now I don't know how to put it in place and get it to work! Does anyone have a second to give me a few tips? Quote Carolyn Link to comment Share on other sites More sharing options...
marrarosaa Posted September 1, 2006 Share Posted September 1, 2006 Hi did you receive some help from Postfinance? Bye Alex I changed some things in modules/payment/postfinance.php I replaced $keys[]='MODULE_PAYMENT_POSTFINANCE_TXT_SHOP_ID_'.$currencies['title']; $keys[]='MODULE_PAYMENT_POSTFINANCE_TEXT_HASH_'.$currencies['title']; $keys[]='MODULE_PAYMENT_POSTFINANCE_SHOP_ID_'.$currencies['title']; by $keys[]='MODULE_PAYMENT_POSTFINANCE_TXT_SHOP_ID_'.$currencies['code']; $keys[]='MODULE_PAYMENT_POSTFINANCE_TEXT_HASH_'.$currencies['code']; $keys[]='MODULE_PAYMENT_POSTFINANCE_SHOP_ID_'.$currencies['code']; because I had wrong values in the form. But it still seems to be more problems. I emailed postfinance to ask them. If this was the problem I'll tell you. Quote Link to comment Share on other sites More sharing options...
schlegk Posted December 13, 2006 Share Posted December 13, 2006 Can someone please tell me where in the file checkout_confirmation.php should this sample code appear: <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> Thanks in advance! K. Quote Link to comment Share on other sites More sharing options...
einarsson Posted December 15, 2006 Share Posted December 15, 2006 Can someone please tell me where in the file checkout_confirmation.php should this sample code appear:<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> Thanks in advance! K. Thanks for bringing this up! I installed yesterday this module and it works fine. I did not put this text anywhere, just did those two small modification. I can make payments and it works fine....BUT no confirmation e-mail is send to the customer. But the sale is register and I can print out the invoice from the admin but I dont get confirmation from PTT that the payment whent through, probably because I did not put the text above. What is missing in this contribution is the explanaation WHERE to put this text and if something should be inside the cotation marks "". And should "txtHash" value="2eec74b9ed68543eed63e587e4fbd429"> be replaced with the correct one? I think this contribution is great but if there are missing instruction it can create kind of nightmare. Someone there for help.....please. Thank you. EDE Quote Link to comment Share on other sites More sharing options...
schlegk Posted December 16, 2006 Share Posted December 16, 2006 Thanks for the reply. You mentioned you made the two changes to the code as described in the contribution installation instructions, but when I add the line specified on point 2 on the instructions, it doesn't work. 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'));} I add the code and then do a test on my site and when I choose PostFinance as my payment method and then click on the Continue button, the page doesn't advance. Any ideas what I am doing wrong? Thanks K Quote Link to comment Share on other sites More sharing options...
Guest Posted January 23, 2007 Share Posted January 23, 2007 Thanks for the reply. You mentioned you made the two changes to the code as described in the contribution installation instructions, but when I add the line specified on point 2 on the instructions, it doesn't work. 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'));} I add the code and then do a test on my site and when I choose PostFinance as my payment method and then click on the Continue button, the page doesn't advance. Any ideas what I am doing wrong? Thanks K Hello, The replacement for currency codes and titles have been fixed in the contribution. And for your question, maybe your page is not realoded. Did you add the tep_redirect line at the right place? Check the readme file again. Sorry for all the worries. We only updated the contribution of somebody else, but it's not an easy contribution to install, as well as not the easiest payment module as well.... Regards ASULIS Quote Link to comment Share on other sites More sharing options...
schlegk Posted January 23, 2007 Share Posted January 23, 2007 Thank you. I installed the most recent contribution and now receive this: I've tried all the various fixes and made sure my shop id and hash was correct....still no luck! Thanks, K. Hello, The replacement for currency codes and titles have been fixed in the contribution. And for your question, maybe your page is not realoded. Did you add the tep_redirect line at the right place? Check the readme file again. Sorry for all the worries. We only updated the contribution of somebody else, but it's not an easy contribution to install, as well as not the easiest payment module as well.... Regards ASULIS Quote Link to comment Share on other sites More sharing options...
chocomoto Posted January 31, 2007 Share Posted January 31, 2007 (edited) I'm occasionally getting lost orders. The customer payment arrives in YellowPay, but there is no record of the order in Admin. Is there a way to retrieve the order? Is there a fix for this? Any info would be greatly appreciated!! Thanks :) Edited January 31, 2007 by chocomoto Quote Carolyn Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2007 Share Posted February 5, 2007 I'm occasionally getting lost orders. The customer payment arrives in YellowPay, but there is no record of the order in Admin. Is there a way to retrieve the order? Is there a fix for this? Any info would be greatly appreciated!! Thanks :) you should ask yellowpay to change to http mod to validate the order. regards Quote Link to comment Share on other sites More sharing options...
Naoki Posted February 14, 2007 Share Posted February 14, 2007 Thank you. I installed the most recent contribution and now receive this: I've tried all the various fixes and made sure my shop id and hash was correct....still no luck! Thanks, K. Any news on this? I can't get it to work either.. Thanks Quote Link to comment Share on other sites More sharing options...
Nick Weisser Posted March 16, 2007 Share Posted March 16, 2007 Hi Asulis, Thanks for your contribution to the PostFinance module. I really like it without the postfinance_process.php page :thumbsup: I've installed the latest version, but have a problem with some directions in the _README.html, i.e. Step 3 of the installation instructions. 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();} If this is changed accordingly the code reads like this after the changes echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) echo $payment_modules->process_button(); if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } which does not make any sense to me. Did you possibly mean to replace one for the other instead of adding it after? And if I understand your code changes correctly all payment modules will now run in GET mode which is not very good and makes everything incompatible with other payment modules that need POST instead. Please correct me if I'm wrong. I'd really appreciate if you could comment on this. Thanks, Nick Quote Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2007 Share Posted April 27, 2007 If this is changed accordingly the code reads like this after the changes echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); if (is_array($payment_modules->modules) && ($$payment->code == 'postfinance')) echo $payment_modules->process_button(); if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } which does not make any sense to me. Did you possibly mean to replace one for the other instead of adding it after? And if I understand your code changes correctly all payment modules will now run in GET mode which is not very good and makes everything incompatible with other payment modules that need POST instead. Please correct me if I'm wrong. I'd really appreciate if you could comment on this. Thanks, Nick Hello sorry for the delay, but I don't really follow all the forum questions, it's better to contact me directly if you don't get the module to work. To answer you, you are right, reading your code, you don't have to write it twice, you don't have to add this line, as with your example the ...process_button() function is called for every payment module. The point with the get mode, is the point 2 : 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'));} BUT if you don't to make the redirect in get mod and have problem for other modules which must be in POST MOD you should have it like this : if (is_array($payment_modules->modules) && $$payment->code == 'postfinance') {if(!isset($HTTP_GET_VARS['isingetmod'])) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL').'&isingetmod=1');}} Kindest regards ASULIS Quote Link to comment Share on other sites More sharing options...
Nick Weisser Posted April 30, 2007 Share Posted April 30, 2007 To answer you, you are right, reading your code, you don't have to write it twice, you don't have to add this line, as with your example the ...process_button() function is called for every payment module. Thanks for your reply, Asulis. Same problem in this part of the code. Your modifications are working if the store is using Postfinance only with no other payment modules activated otherwise the equation of the if statment will never become true and subsequently won't show the process button. I'll try to fix this and upload a new version to the contributions repository. Cheers, Nick Quote Link to comment Share on other sites More sharing options...
JaneWayne Posted August 22, 2007 Share Posted August 22, 2007 Hi I have installed this contrbution and did successfully test it with my testing account. Now my customer subscribed to the Postfinance service and recieved the needed details. Before we were going live we wanted to do some test with customers ID and always received the error number 100. Postfinance customers service told me that this error occurs if the hash they did calculate does not match with the one the shop did calculate. We didn't had this problem with my test ID, but apparently they dont control the hash on test accounts and therefore we never had a problem. Now the shop should go live and I have no clue how to solve the problem. Help would greatly be appreciated :) Thanks in advance ! Brigitte Quote Link to comment Share on other sites More sharing options...
Nick Weisser Posted August 22, 2007 Share Posted August 22, 2007 Postfinance customers service told me that this error occurs if the hash they did calculate does not match with the one the shop did calculate.We didn't had this problem with my test ID, but apparently they dont control the hash on test accounts and therefore we never had a problem. Hi Brigitte, It might be that some of the weird special characters that PostFinance are using in their hash values are causing this problem. The txtHash value that is transferred is built like so: $txtHash_tosecure = $Shop_ID . $currency . $usedtotal . $Hash_seed; $txtHash = md5($txtHash_tosecure); So one thing you could do to check the correctness of your hash would be to manually calcualte the txtHash value by using either a separate PHP script or a simple calculator in combination with an online md5 hash generator. Then verify the value with the one that is in the hidden field on the checkout_confirmation.php or postfinance_process.php page - depending on what version of the PostFinance payment module you are using. Another approach would be to directly add the hash to the payment module script in /includes/modules/payment/postfinance.php, but if this won't solve the problem you will have to recalculate the txtHash value anyway. Cheers, Nick Quote Link to comment Share on other sites More sharing options...
JaneWayne Posted August 23, 2007 Share Posted August 23, 2007 Hi Brigitte,It might be that some of the weird special characters that PostFinance are using in their hash values are causing this problem. The txtHash value that is transferred is built like so: $txtHash_tosecure = $Shop_ID . $currency . $usedtotal . $Hash_seed; $txtHash = md5($txtHash_tosecure); So one thing you could do to check the correctness of your hash would be to manually calcualte the txtHash value by using either a separate PHP script or a simple calculator in combination with an online md5 hash generator. Then verify the value with the one that is in the hidden field on the checkout_confirmation.php or postfinance_process.php page - depending on what version of the PostFinance payment module you are using. Another approach would be to directly add the hash to the payment module script in /includes/modules/payment/postfinance.php, but if this won't solve the problem you will have to recalculate the txtHash value anyway. Cheers, Nick Hi Nick Thank you very much for your answer :) PF did change my Hash seed and nw it only contains 2 special chars {' so far so good... I have directly added the Hash to /includes/modules/payment/postfinance.php which unfortunately didnt solve the problem. But both times I did get the same hash in the hidden field. 022d44c0270e2092d6f5c900e697e700 022d44c0270e2092d6f5c900e697e700 Im not sure if I did understand the bit with the md5 generator: I did convert the master shop id XXXX_yp, the Hash, the shop id XXXX and the currency CHF in the md5 generator. So I have 4 md5 generared strings. But what am I doing now? Thanks for your help Brigitte Quote Link to comment Share on other sites More sharing options...
Nick Weisser Posted August 24, 2007 Share Posted August 24, 2007 I did convert the master shop id XXXX_yp, the Hash, the shop id XXXX and the currency CHF in the md5 generator.So I have 4 md5 generared strings. But what am I doing now? If you look at the PHP code you'll notice that the md5 hash is created from the concatenated strings after the equal to sign. Only ONE md5 hash is created, not 4! So if you want to verify with the md5 hash code generator, you need to concatenate all of the strings end then get the md5 hash from this new string. Are you sure you are using the correct shop IDs. If I were you I'd send the HTML code that is generated on the checkout_confirmation.php (or postfinance_process.php) page, i.e. the order form with the hidden fields to PostFinance and ask them if you got the parameters right. Maybe it's just a typo. Cheers, Nick Quote Link to comment Share on other sites More sharing options...
schlegk Posted January 11, 2008 Share Posted January 11, 2008 Install Button in Admin not working! I've been trying for about 12 months (on and off) to get this contribution working for me, but I am still having no luck whatsoever. Now I have just installed the newest version (postfinance_asulis_2008-01-10) and when I go to admin to install and configure it, nothing happens. I've triple checked everything and I don't know what I'm doing wrong. Please help! K. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.