kudviss Posted February 16, 2007 Share Posted February 16, 2007 Hello. I have installed the default Paypal payment module in admin area. But when i have made a test I was every time directed to Paypal French website even if I tried to checkout using English or other languages in the store. I want the French users to be directed in Paypal French and English users to English Paypal. Please kindly reply to this topic. Thank you. Link to comment Share on other sites More sharing options...
GemRock Posted February 16, 2007 Share Posted February 16, 2007 you could try to make a copy the paypal.php module and rename it to, say, paypal_french, then edit the paypal url in that file to match the french paypal server. and also make some other changes such as class name in it so that it wont conflict with th eoriginal (English) paypal module. And dont forget the paypal language file, which needs to be the same name as the new french paypal module and, obviously, translate it into french. Good Luck Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
kudviss Posted February 17, 2007 Author Share Posted February 17, 2007 Thank you Ken, but the problem is that whatever the costumer chooses, when he confirms the order he is always redircted to PAYPAL French platform. I installed PAYAL IPN now, but the same problem persists. Please try to give more clear and precise help because I only have some notions in Oscommerce. Thank you again Link to comment Share on other sites More sharing options...
Velveeta Posted February 17, 2007 Share Posted February 17, 2007 Thank you Ken, but the problem is that whatever the costumer chooses, when he confirms the order he is always redircted to PAYPAL French platform. I installed PAYAL IPN now, but the same problem persists. Please try to give more clear and precise help because I only have some notions in Oscommerce. Thank you again The basics of what he said would still apply, you're going to want to check the customer's language and send them to the appropriate version of the paypal site... You could do this right inside of the module itself, when it generates the form_url, just do a quick check to see if their language is english or french, and set the form_url to the proper paypal address for each language... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
kudviss Posted February 17, 2007 Author Share Posted February 17, 2007 The basics of what he said would still apply, you're going to want to check the customer's language and send them to the appropriate version of the paypal site... You could do this right inside of the module itself, when it generates the form_url, just do a quick check to see if their language is english or french, and set the form_url to the proper paypal address for each language... Richard. Many thanks to all of you. But which file, which line or which code should I replace by which. I am new to PHP. Please be kindly more precise in your replies. Link to comment Share on other sites More sharing options...
Velveeta Posted February 17, 2007 Share Posted February 17, 2007 Many thanks to all of you. But which file, which line or which code should I replace by which. I am new to PHP. Please be kindly more precise in your replies. You'll need to update the actual paypal module file, which is whatever you downloaded for the IPN, maybe called paypal_ipn.php or something, found in your includes/modules/payment/paypal_ipn.php... Look for the part in the beginning, maybe called function paypal_ipn or something, that looks like this: $this->form_action_url = 'https://secure.paypal.com/cgi-bin/webscr'; That's gonna hold the url that they're sent off to... At the beginning of that function, add a global variable reference for $language, so it looks like this: global $order, $language; And then above the form_action_url line, add a check for this: if ($language == 'french') { $this->form_action_url = 'https://secure.paypal.com/cgi-bin/webscr'; <-- set this to the french version's url... } else { $this->form_action_url = 'https://secure.paypal.com/cgi-bin/webscr'; } I can't promise it will work, but that's about the jist of what you'll need to do... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
kudviss Posted February 18, 2007 Author Share Posted February 18, 2007 Hi Richard, I did exactly what you said but as you can see in the code below the Paypal contribution files are already set to English version paypal, but however whatever the language selected in my store the costumers are always to French version paypal, this is really amazing !! This a part of a the IPN contribution code: // class constructor function paypal_ipn() { global $order, $this->code = 'paypal_ipn'; $this->title = MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE; $this->description = MODULE_PAYMENT_PAYPAL_IPN_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_PAYPAL_IPN_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_PAYPAL_IPN_STATUS == 'True') ? true : false); $this->email_footer = MODULE_PAYMENT_PAYPAL_IPN_TEXT_EMAIL_FOOTER; $this->identifier = 'osCommerce PayPal IPN v2.1'; if ((int)MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') { $this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr'; } else { $this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; } } Link to comment Share on other sites More sharing options...
Velveeta Posted February 18, 2007 Share Posted February 18, 2007 Hi Richard, I did exactly what you said but as you can see in the code below the Paypal contribution files are already set to English version paypal, but however whatever the language selected in my store the costumers are always to French version paypal, this is really amazing !! This a part of a the IPN contribution code: // class constructor function paypal_ipn() { global $order, $this->code = 'paypal_ipn'; $this->title = MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE; $this->description = MODULE_PAYMENT_PAYPAL_IPN_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_PAYPAL_IPN_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_PAYPAL_IPN_STATUS == 'True') ? true : false); $this->email_footer = MODULE_PAYMENT_PAYPAL_IPN_TEXT_EMAIL_FOOTER; $this->identifier = 'osCommerce PayPal IPN v2.1'; if ((int)MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') { $this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr'; } else { $this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; } } In that case, it might not be something you have any control over... Some sites detect either what country a person is coming from, or what version of browser they're using, or whatever, and automatically direct the user to a specific version of their site... If that module is sending people to the standard paypal site, and paypal is detecting they're either in france or using a french version of their browser, even if they're english-speaking, it could be directing them to a french version of their page... There's nothing that I know of that you can do to change this behavior... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
kudviss Posted February 18, 2007 Author Share Posted February 18, 2007 In that case, it might not be something you have any control over... Some sites detect either what country a person is coming from, or what version of browser they're using, or whatever, and automatically direct the user to a specific version of their site... If that module is sending people to the standard paypal site, and paypal is detecting they're either in france or using a french version of their browser, even if they're english-speaking, it could be directing them to a french version of their page... There's nothing that I know of that you can do to change this behavior... Richard. I think maybe because I have made a modification on my store so that the default store language should be in French, I will remove that modification. and try again your idea. But could you please insert the codes you told me above in the paypal_ipn.php part of code above, because there is the standbox condition confusing me so i don t know where to put your code exactly Link to comment Share on other sites More sharing options...
kudviss Posted February 18, 2007 Author Share Posted February 18, 2007 My store now detectes the language set in the browser, but PAYPAL problem persists> Another point the paypal French URL is https://www.paypal.com/cgi-bin/webscr it is the same as the English URL i think Link to comment Share on other sites More sharing options...
kudviss Posted February 18, 2007 Author Share Posted February 18, 2007 My store now detectes the language set in the browser, but PAYPAL problem persists> Another point the paypal French URL is https://www.paypal.com/cgi-bin/webscr it is the same as the English URL i think ORIIIIIIIKAAA, I figured out where the problem is, Richard you gave some hints thank you, the problem was that the test user i Log in to the store was registred with FRANCE as a country, So that s why Paypal Module copies automatically the country of the user to paypal website and thus the payment platform was in French, when i used another test user with a UK as a country it automatically was in ENGLISH. Many thanks to everyone for your ideas. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.