am1971 Posted February 13, 2005 Share Posted February 13, 2005 After not sleeping the whole night I figured out how to fix the problem that many are having, myself included. Got an email from tech support. So basically the problem is that a customer places an order checks out, there is no record of the order in oscommerce and no product name so we don't know what has been purchased nor what to send. Here is how to fix the problem: go to: /catalog/includes/modules/payment/pm2checkout.php Of course you need to back it up before you do any changes. Use a text editor and open pm2checkout.php, look for this section: $process_button_string" Look between these 2 lines of codes: ------------- tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . <- dot ------------- tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); ------------- If you don't have any code between those 2 lines add this missing code: tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . <-- don't forget the dot so it will look like this: tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . <-- dot tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . <------ dot Save this updated pm2checkout.php and upload it to the same directory where it was before /catalog/includes/modules/payment/ Now once a customer places an order you will get an email which includes a link on your store of what has been purchased. Now let's make sure that the pm2checkout_process.php is correctly setup: It is in /catalog/ get it and open it with a text editor. Make sure that the 2 addresses are setup correctly under: ----- <form name="twocoprocessform" method="POST" action="http://www.mysite.com/catalog/checkout_process.php"> Change to <form name="twocoprocessform" method="POST" action="http://www.yoursite.com/catalog/checkout_process.php"> and the 2nd address below it change to the same. -------- Under 2checkout admin panel under look and feel make sure that the addresses you enter in pending and approved url start both with http: and both addresses match the pm2checkout_process.php addresses we setup above. So for approved url it should be something like http://www.yoursite.com/catalog/checkout_process.php and pending url http://www.yoursite.com/catalog/checkout_process.php make sure you know the difference between http and https, if you have an SSL your addresses should start with https if not than just http. Another important think is that direct return must be set to "Off" in order for the information to passed back to your oscommerce server. It took me over 2 weeks to get an answer from 2checkout people and it looks like it is working now after doing 3 tests, the purchase is recorded in oscommerce and I know now the products that were ordered :) Hope will work for you, you can see from my explanation that I do not know PHP so I tried my best to explain it in simple words. Good luck Quote Link to comment Share on other sites More sharing options...
osDJ Posted February 14, 2005 Share Posted February 14, 2005 Sounds good. Except if you put direct return to "off" it will not go back and record your order in oscommerce unless the customer clicks on the "finished" button on 2co. If they don't do this, you're back to square one. I have set mine up to work fine with the automatic redirect working as well. Quote Link to comment Share on other sites More sharing options...
MaryKH Posted February 19, 2005 Share Posted February 19, 2005 I am using the PayPal module that came with the package and there is no pm2checkout_process.php file, what am I missing? Thanks, Mary Quote Link to comment Share on other sites More sharing options...
kevintai Posted February 20, 2005 Share Posted February 20, 2005 so it will look like this:tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . <-- dot tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . <------ dot Thank you for sharing I've test it but I find that there is one thing have a little error the missing line should add in the middle as you say otherwise the check out page will be blank it's very important so it should look like this tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . <-- dot tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . <------ dot //must add in the middle// tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); Also I want to run the test mode and to see if it really works but I just couldn't because everytime I enter incorrect credit card number the 2CO will link to the error page ask me to enter again . Can anyone tell me how to do it using test mode ??? Thank you very much for sharing such valuabe stuff !! Quote Link to comment Share on other sites More sharing options...
am1971 Posted February 20, 2005 Author Share Posted February 20, 2005 Sounds good. Except if you put direct return to "off" it will not go back and record your order in oscommerce unless the customer clicks on the "finished" button on 2co. If they don't do this, you're back to square one. I have set mine up to work fine with the automatic redirect working as well. <{POST_SNAPBACK}> Hi Download PM2checkout from the controbutions Quote Link to comment Share on other sites More sharing options...
am1971 Posted February 20, 2005 Author Share Posted February 20, 2005 Thank you for sharing I've test it but I find that there is one thing have a little error the missing line should add in the middle as you say otherwise the check out page will be blank it's very important so it should look like this tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . <-- dot tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . <------ dot ? //must add in the middle// tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); Also I want to run the test mode and to see if it really works but I just couldn't because everytime I enter incorrect credit card number the 2CO will link to the error page ask me to enter again . Can anyone tell me how to do it using test mode ??? Thank you very much for sharing such valuabe stuff !! <{POST_SNAPBACK}> Hi Well how I tested it was that I didn't use the test mode, could not use it and gave me errors. I went to Oscommerce and added a dummy product that was worth $0.10, placed an order and used a real credit card, after that just credited back my self from the 2checkout admin area. Quote Link to comment Share on other sites More sharing options...
kevintai Posted February 21, 2005 Share Posted February 21, 2005 Hi Well how I tested it was that I didn't use the test mode, could not use it and gave me errors. I went to Oscommerce and added a dummy product that was worth $0.10, placed an order and used a real credit card, after that just credited back my self from the 2checkout admin area. <{POST_SNAPBACK}> I just follow the way you teach me. using the real transcation by dummy products. :however, I just got the error when I click finish the transcation in 2CO it will direct to my website page. However, when they go back to my website page it won't go to the completed process page it will direct to "member login" page ; therefore, the checkout information was save to my database.. ... Oh ~ My ~~ God ~~ what can I do with it ?? I just follow the the excatly same thing as you did. what I did wrong ? I am using the share SSL is that causing the problem ? I am directing the link to " https://www.mysecuresite.com/catalog/checkout_process.php " or should I using another link instead ? such as " https://www.mysecuresite.com/catalog/checkout_success.php " instead?? or should I turn off my Share SSL function ? Anyone have a ideas Please it emergency ~~ Thank you for your time !!! Quote Link to comment Share on other sites More sharing options...
kevintai Posted February 21, 2005 Share Posted February 21, 2005 I just follow the way you teach me. using the real transcation by dummy products. :however, I just got the error when I click finish the transcation in 2CO it will direct to my website page. However, when they go back to my website page it won't go to the completed process page it will direct to "member login" page ; therefore, the checkout information was save to my database.. ... Oh ~ My ~~ God ~~ what can I do with it ?? I just follow the the excatly same thing as you did. what I did wrong ? I am using the share SSL is that causing the problem ? I am directing the link to " https://www.mysecuresite.com/catalog/checkout_process.php "or should I using another link instead ? such as " https://www.mysecuresite.com/catalog/checkout_success.php " instead?? or should I turn off my Share SSL function ? Anyone have a ideas Please it emergency ~~ Thank you for your time !!! <{POST_SNAPBACK}> Sorry typing mistake I mean the checkout information didn't save into my database !! Quote Link to comment Share on other sites More sharing options...
kevintai Posted February 21, 2005 Share Posted February 21, 2005 Right now I trun off my Shared SSL and the 2checkout just worked ~~~ but I prefer my site having share SSL ~~~ If anyone have any ideas or suggetion please let me know ~~ thank you so much !! Quote Link to comment Share on other sites More sharing options...
Farrukh Posted February 21, 2005 Share Posted February 21, 2005 has anyone come out with a New module for 2Checkout's Version 2? . 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.