tdcaron Posted July 7, 2003 Share Posted July 7, 2003 Dear Contributors & Programmers, I have been asked if there is a way to create a payment mod for Lynk-Systems. Currently Lynk Systems does not support OsCommerce Order process. What I have noticed is that Lynk Systems uses almost the same aspects as PayPal. Below is a copy of the linking code for Lynk Systems <FORM name="test" METHOD="POST" ACTION="secure link" ENCTYPE="x-www-form-urlencoded"> <INPUT TYPE="hidden" NAME="amount" VALUE="product_value"> <INPUT TYPE="hidden" NAME="name" VALUE="product_name"> <INPUT TYPE="hidden" NAME="shipcost" VALUE="product_ship"> <input type ="hidden" NAME="referID" Value="session_ID"> <INPUT TYPE="hidden" NAME="sourceurl" VALUE="return url"> <INPUT TYPE="submit" VALUE="BUY"></B></FORM> This is very simliar to PayPal. How would I go about creating a payment mod for the above code? Any suggestions. Also, if this mod can not be implemented, is there a way of carrying an Affiliate ID or session variable to this script via the referID Value in the script. Outside of the osCommerce Store. For example, could you create a sessionID for an affiliate that could track the sale of a product outside the store. Any and all help would be greatly appreciated Thanks Tim He who does not want to learn never creates masterpieces Link to comment Share on other sites More sharing options...
Guest Posted July 7, 2003 Share Posted July 7, 2003 Have you tried editing the PayPal module (includes/modules/payment/paypal.php) by replacing all the PayPal specific stuff with Lynk-Systems information and renaming it lynk-systems.php? You would particularly need to edit this line: $this->form_action_url = 'https://secure.paypal.com/cgi-bin/webscr'; Good luck, Matt Link to comment Share on other sites More sharing options...
tdcaron Posted July 7, 2003 Author Share Posted July 7, 2003 Yes I have, I have edited the PayPal.php file to reflect the infromation for Lynk Systems but when I click the checkout buttom in oscommerce I get the following on the linksystems website Location: And that's it. I have contacted the Lynk Systems tech support about the error and they claim the reason I am getting the error is that the location: page that the link refers to is very similar to the link that paypal requires for the continue shopping button. Any suggestions? Thanks Tim He who does not want to learn never creates masterpieces Link to comment Share on other sites More sharing options...
Guest Posted January 30, 2004 Share Posted January 30, 2004 Setting up Lynk Systems to work with oscommerce isn't really that bad. I was able to hack up the "Authorize.net with CVV for MS1 update" module to make it work for Lynk. Here is how I did it. Once I neat up the code I'll post it on the contributions. - Install Authorize.net with CVV for MS1 update - Edit PATH/catalog/includes/modules/authorizenet_direct.php. You want to change the $form_data fields for the Lynk specific values (as well as add the storeid, terminal id, and merchant id). At the bottom of that file, you'll want to change the address which curl connects to, to the URL of the lynk systems gateway. - Edit PATH/catalog/includes/modules/payment/authorizenet.php. In the function "before_process" you'll need to make changes so it understands Lynk's response code. Here is what I have: function before_process() { global $response; $response_vars = explode('&', $response[0]); $eresponse_vars = explode('=', $response_vars[0]); $x_response_code = $eresponse_vars[1]; if ($x_response_code != '0') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message= ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_ERROR_MESSAGE), 'SSL', true, false)); } } Other then that, everything else is pretty straight forward. If anyone has any questions, feel free to e-mail me. -Kevin [email protected] www.drunks.com Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2004 Share Posted December 3, 2004 So why doesn't anyone just use Lynk Payment Module? http://www.oscommerce.com/community/contri...all/search,lynk And com'n guys this isn't tough for you to make whats going on? Setting up Lynk Systems to work with oscommerce isn't really that bad. I was able to hack up the "Authorize.net with CVV for MS1 update" module to make it work for Lynk. Here is how I did it. Once I neat up the code I'll post it on the contributions. - Install Authorize.net with CVV for MS1 update - Edit PATH/catalog/includes/modules/authorizenet_direct.php. You want to change the $form_data fields for the Lynk specific values (as well as add the storeid, terminal id, and merchant id). At the bottom of that file, you'll want to change the address which curl connects to, to the URL of the lynk systems gateway. - Edit PATH/catalog/includes/modules/payment/authorizenet.php. In the function "before_process" you'll need to make changes so it understands Lynk's response code. Here is what I have: function before_process() { global $response; $response_vars = explode('&', $response[0]); $eresponse_vars = explode('=', $response_vars[0]); $x_response_code = $eresponse_vars[1]; if ($x_response_code != '0') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message= ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_ERROR_MESSAGE), 'SSL', true, false)); } } Other then that, everything else is pretty straight forward. If anyone has any questions, feel free to e-mail me. -Kevin [email protected] www.drunks.com <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.