themadman Posted January 1, 2004 Share Posted January 1, 2004 paysystems module supports recurring charges, but to do so you must set it includes/modules/payment/paysystems.php That's cool, but not all products are recurring. I have monthly and yearly. I have one product option, Billing Method with two values: Yearly and Monthly. I am assuming that the option value variables would be the same meaning that monthly would be $monthly and yearly would be $yearly I'm probably wrong... Here's the whole except from paysystems.php ? ? ? $process_button_string = tep_draw_hidden_field('product1',$products_list) .? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('companyid', MODULE_PAYMENT_PAYSYSTEMS_LOGIN) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('formget','Y') . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('redirect',tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) . ? ? ? ? ? ? ? tep_draw_hidden_field('redirectfail',tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true)) . if ($yearly == "") { tep_draw_hidden_field('reoccur','N') . } else { tep_draw_hidden_field('reoccur','Y'). } ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('cycle','30') . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('totalperiod','9999') . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('repeatamount','<?php echo "$total";?>') . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('total', number_format($order->info['total'], 2)) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_firstname', $order->customer['firstname']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_middlename','') . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_lastname', $order->customer['lastname']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_address', $order->customer['street_address']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_city', $order->customer['city']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_state', $order->delivery['country']['iso_code_2']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_zip', $order->customer['postcode']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_country',$order->customer['country']['iso_code_2']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('b_tel', $order->customer['telephone']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('email', $order->customer['email_address']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_firstname', $order->delivery['firstname']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_middlename','') . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_lastname', $order->delivery['lastname']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_address', $order->delivery['street_address']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_city', $order->delivery['city']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_state', $order->delivery['country']['iso_code_2']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_zip', $order->delivery['postcode']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_country', $order->delivery['country']['iso_code_2']) . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tep_draw_hidden_field('s_tel','') . ? ? ? $process_button_string .= tep_draw_hidden_field(tep_session_name(), tep_session_id()); ? ? ? return $process_button_string; ? ? } I added if ($yearly == "") { tep_draw_hidden_field('reoccur','N') . } else { tep_draw_hidden_field('reoccur','Y'). } to it... and something is obviously wrong with the syntax or more... cuz i get a parse error. I don't know the code well enough and how it should be coded to work inside this other code. hence my post here someone plez help Link to comment Share on other sites More sharing options...
themadman Posted January 1, 2004 Author Share Posted January 1, 2004 I tried it with this code too and still got parse error. if (isset($yearly)) { echo "tep_draw_hidden_field('reoccur','N') ."; echo "tep_draw_hidden_field('cycle','365') ."; } if (isset($monthly)) { echo "tep_draw_hidden_field('reoccur','Y') ."; echo "tep_draw_hidden_field('cycle','30') ."; } Link to comment Share on other sites More sharing options...
themadman Posted January 1, 2004 Author Share Posted January 1, 2004 if (isset($yearly)) {$iwreoccur = "tep_draw_hidden_field('reoccur','N')"; echo "tep_draw_hidden_field('cycle','365')"; } if (isset($monthly)) { $iwreoccur = "tep_draw_hidden_field('reoccur','Y')"; $iwcycle = "tep_draw_hidden_field('cycle','30')"; } $process_button_string = tep_draw_hidden_field('product1',$products_list) . tep_draw_hidden_field('companyid', MODULE_PAYMENT_PAYSYSTEMS_LOGIN) . $iwreoccur . $iwcycle . tep_draw_hidden_field('formget','Y') . tep_draw_hidden_field('redirect',tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) . tep_draw_hidden_field('redirectfail',tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true)) . tep_draw_hidden_field('totalperiod','9999') . tep_draw_hidden_field('repeatamount','<?php echo "$total";?>') . tep_draw_hidden_field('total', number_format($order->info['total'], 2)) . tep_draw_hidden_field('b_firstname', $order->customer['firstname']) . tep_draw_hidden_field('b_middlename','') . tep_draw_hidden_field('b_lastname', $order->customer['lastname']) . tep_draw_hidden_field('b_address', $order->customer['street_address']) . tep_draw_hidden_field('b_city', $order->customer['city']) . tep_draw_hidden_field('b_state', $order->delivery['country']['iso_code_2']) . tep_draw_hidden_field('b_zip', $order->customer['postcode']) . tep_draw_hidden_field('b_country',$order->customer['country']['iso_code_2']) . tep_draw_hidden_field('b_tel', $order->customer['telephone']) . tep_draw_hidden_field('email', $order->customer['email_address']) . tep_draw_hidden_field('s_firstname', $order->delivery['firstname']) . tep_draw_hidden_field('s_middlename','') . tep_draw_hidden_field('s_lastname', $order->delivery['lastname']) . tep_draw_hidden_field('s_address', $order->delivery['street_address']) . tep_draw_hidden_field('s_city', $order->delivery['city']) . tep_draw_hidden_field('s_state', $order->delivery['country']['iso_code_2']) . tep_draw_hidden_field('s_zip', $order->delivery['postcode']) . tep_draw_hidden_field('s_country', $order->delivery['country']['iso_code_2']) . tep_draw_hidden_field('s_tel','') . $process_button_string .= tep_draw_hidden_field(tep_session_name(), tep_session_id()); return $process_button_string; } seems ok... unsure if it's actually working yet tho. Link to comment Share on other sites More sharing options...
themadman Posted January 1, 2004 Author Share Posted January 1, 2004 didnt work.. sigh Link to comment Share on other sites More sharing options...
themadman Posted January 2, 2004 Author Share Posted January 2, 2004 I tried modifying nothing but one line in paystems.php I want this to be the numerical value of the pull down list, which for yearly is 365 and monthly is 30. This line: tep_draw_hidden_field('cycle','<?php echo "$selected_attribute";?>'). I tried $selected_attribute because i found it in product_info.php which is the page you set hte option on. That's all i need to do, pull the option variable they chose from the list and use that value for the cycle variable which is sent to paysystems. Right now with the code above... the results read: This is a recurring transaction. Your account will be charged every days USD notice how the number of days is missing, that's because I still don't have it working! please help/advise if you have even the slightest idea, I'll try it! thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.