function payment_button($order_id, $product_type) { if (func_num_args() > 1) { $product_type = func_get_arg(1); } if ($product_type == '') { $product_type = 'P'; // posting package } // else product type of 'S' is a subscription. global $label; if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($order_id); $prod_id = $order_row['package_id']; } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($order_id); $prod_id = $order_row['subscription_id']; } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($order_id); $prod_id = $order_row['membership_id']; } ?> <center> <form id="payment_button" name="_2coform" action="<?php echo _2CO_PAYMENT_ROUTINE; ?> " method="post"> <?php /* Optional parameters sh_cost - Shipping and handling cost, if any in your current currency. c_name or c_name_[:digit] - Required for new product creation. Name of new product limited to 128 characters. c_description or c_description_[:digit] - Required for new product creation. Short description of the product, limited to 255 characters. Longer description will be stored in the 2Co product database as long description, and will not show up on checkout pages. c_price or c_price_[:digit] - Required for new product creation. Price of the product in your current currency. Numbers and decimal points only. Maximum value 999999.99 c_tangible or c_tangible_[:digit] - Y or y indicates as tangible or physical product N or n indicates an e-good or a service. */ if ($order_row['user_type'] == 'C') { // Is user type a Candiadte? ?> <input type="hidden" name="x_receipt_link_url" value="<?php echo _2CO_CANDIDATE_X_RECEIPT_LINK_URL; ?> "> <input type="hidden" name="return_url" value="<?php echo _2CO_CANDIDATE_X_RECEIPT_LINK_URL; ?> "> <?php } else { ?> <input type="hidden" name="x_receipt_link_url" value="<?php echo _2CO_X_RECEIPT_LINK_URL; ?> "> <input type="hidden" name="return_url" value="<?php echo _2CO_X_RECEIPT_LINK_URL; ?> "> <?php } ?> <input type="hidden" name="demo" value="<?php echo _2CO_DEMO; ?> "> <input type="hidden" name="sid" value="<?php echo _2CO_SID; ?> "> <input type="hidden" name="total" value="<?php echo JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], 'USD'); ?> "> <input type="hidden" name="cart_order_id" value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> "> <input type="hidden" name="fixed" value="N"> <input type="hidden" name="c_name" value="<?php echo htmlentities(JB_SITE_NAME); ?> - #<?php echo htmlentities($product_type . $prod_id); ?> "> <input type="hidden" name="c_description" value="<?php echo htmlentities($order_row['item_name']); ?> "> <input type="hidden" name="c_price" value="<?php echo JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], 'USD'); ?> "> <input type="hidden" name="c_tangible" value="N"> <!-- New parameters --> <input type="hidden" name="c_prod" value="<?php echo htmlentities($product_type . $prod_id); ?> "> <input type="hidden" name="id_type" value="1"> <input type="submit" value="<?php echo $label['payment_2co_submit_butt']; ?> "><br> </form> </center> <center> <img border='0' onclick="document._2coform.submit();" src="http://www.2checkout.com/images/overview/btns/21.jpg"> </center> <!-- automatically submit the payment button --> <script type="text/javascript"> function js_submit_payment() { var form = document.getElementById('payment_button'); form.submit(); } window.onload = js_submit_payment; </script> <?php }
?action=confirm&invoice_id=<?php echo $row['invoice_id'] . $date_link; ?> ' "> <br> <?php } ?> </font></td> <td><font face="Arial" size="2"><?php echo $row['payment_method']; ?> </font></td> <td><font face="Arial" size="2"><?php echo JB_convert_to_currency($row['amount'], $row['currency_code'], DEFAULT_CURR, $row['currency_rate']); ?> </font></td> <td><input type="button" value="Modify" onclick="window.open('subscr_modify.php?invoice_id=<?php echo $row['invoice_id']; ?> &product_type=S', '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=560,left = 50,top = 50');return false;"><b><font face="Arial" size="2"></font></b></td> </tr> <?php } ?> </TABLE> <?php } else { echo "No records found";
function payment_button($order_id, $product_type) { if (func_num_args() > 1) { $product_type = func_get_arg(1); } if ($product_type == '') { $product_type = 'P'; // posting package } global $label; if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($order_id); } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($order_id); } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($order_id); } $Checksum = cc_getCheckSum(CCAVENUE_MERCHANT_ID, JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], CCAVENUE_CURRENCY), jb_prefix_order_id($product_type . $order_row['invoice_id']), CCAVENUE_REDIRECT_URL, CCAVENUE_WORKING_KEY); ?> <form id="payment_button" method="post" action="https://www.ccavenue.com/shopzone/cc_details.jsp"> <input type=hidden name=Merchant_Id value="<?php echo CCAVENUE_MERCHANT_ID; ?> "> <input type=hidden name=Amount value="<?php echo JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], CCAVENUE_CURRENCY); ?> "> <input type=hidden name=Order_Id value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> "> <!--<input type=hidden name=ActionID value="TXN">--> <?php if ($order_row['user_type'] == 'C') { ?> <input type='hidden' name='Redirect_Url' value="<?php echo CCAVENUE_CANDIDATE_REDIRECT_URL; ?> "> <?php } else { ?> <input type=hidden name=Redirect_Url value="<?php echo CCAVENUE_REDIRECT_URL; ?> "> <?php } ?> <input type=hidden name=Checksum value="<?php echo $Checksum; ?> "> <input type="hidden" name="Merchant_Param" value="<?php echo $order_id; ?> "> <center> <INPUT TYPE="submit" value="<?php echo $label['pay_by_ccavenue_button']; ?> "> </center> </form> <!-- automatically submit the payment button --> <script type="text/javascript"> function js_submit_payment() { var form = document.getElementById('payment_button'); form.submit(); } window.onload = js_submit_payment; </script> <?php }
function payment_button($order_id, $product_type) { if (func_num_args() > 1) { $product_type = func_get_arg(1); } if ($product_type == '') { $product_type = 'P'; // posting package } global $label; if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($order_id); } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($order_id); } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($order_id); } ?> <center> <?php if (AUTHNET_TEST_MODE == 'YES') { // //https://test.authorize.net/gateway/transact.dll ?> <FORM id="payment_button" action="https://certification.authorize.net/gateway/transact.dll" method="POST"> <?php } else { ?> <FORM id="payment_button" action="https://secure.authorize.net/gateway/transact.dll" method="POST"> <?php } $loginid = AUTHNET_LOGIN_ID; $x_tran_key = AUTHNET_X_TRAN_KEY; $x_Amount = $order_row['amount']; $amount = JB_convert_to_currency($x_Amount, $order_row['currency_code'], AUTHNET_CURRENCY); $amount = number_format($amount, 2, '.', ''); // Seed random number for security and better randomness. srand(time()); $sequence = rand(1, 1000); $tstamp = time(); $fingerprint = authnet_CalculateFP(AUTHNET_LOGIN_ID, AUTHNET_X_TRAN_KEY, $amount, $sequence, $tstamp, AUTHNET_CURRENCY); authnet_log_entry('Generated payment button with the following fingerprint' . $fingerprint); //echo "trans key: ".$x_tran_key.", login: $loginid seq: $sequence time: $tstamp amount $amount currency:".AUTHNET_CURRENCY." fprint $fingerprint<br>"; echo '<input type="hidden" name="x_fp_sequence" value="' . $sequence . '">'; echo '<input type="hidden" name="x_fp_timestamp" value="' . $tstamp . '">'; echo '<input type="hidden" name="x_fp_hash" value="' . strtoupper($fingerprint) . '">'; // Insert rest of the form elements similiar to the legacy weblink integration //echo ("<input type=\"hidden\" name=\"x_description\" value=\"" . $x_Description . "\">\n" ); echo "<input type=\"hidden\" name=\"x_login\" value=\"" . $loginid . "\">\n"; echo "<input type=\"hidden\" name=\"x_amount\" value=\"" . $amount . "\">\n"; // *** IF YOU ARE PASSING CURRENCY CODE uncomment the line below ***** echo "<input type=\"hidden\" name=\"x_currency_code\" value=\"" . AUTHNET_CURRENCY . "\">\n"; ?> <!-- <INPUT type="hidden" name="x_background_url" value="<?php echo AUTHNET_X_BACKGROUND_URL; ?> "> <INPUT type="hidden" name="x_logo_url" value="<?php echo AUTHNET_X_LOGO_URL; ?> "> <INPUT type="hidden" name="x_color_background" value="<?php echo AUTHNET_X_COLOR_BACKGROUND; ?> "> <INPUT type="hidden" name="x_color_link" value="<?php echo AUTHNET_X_COLOR_LINK; ?> "> <INPUT type="hidden" name="x_color_text" value="<?php echo AUTHNET_X_COLOR_TEXT; ?> "> <INPUT type="hidden" name="x_receipt_link_method" value="<?php echo AUTHNET_X_RECEIPT_LINK_METHOD; ?> "> <?php if ($order_row['user_type'] == 'C') { // Is user type a Candiadte? ?> <INPUT type="hidden" name="x_receipt_link_url" value="<?php echo AUTHNET_CANDIDATE_X_RECEIPT_LINK_URL; ?> "> <?php } else { ?> <INPUT type="hidden" name="x_receipt_link_url" value="<?php echo jb_escape_html(AUTHNET_X_RECEIPT_LINK_URL); ?> "> <?php } ?> <INPUT type="hidden" name="x_receipt_link_text" value="<?php echo jb_escape_html(AUTHNET_X_RECEIPT_LINK_TEXT); ?> "> <INPUT type="hidden" name="x_header_html_payment_form" value="<?php echo htmlentities(AUTHNET_X_HEADER_HTML_PAYMENT_FORM); ?> "> <INPUT type="hidden" name="x_footer_html_payment_form" value="<?php echo htmlentities(AUTHNET_X_FOOTER_HTML_PAYMENT_FORM); ?> "> --> <INPUT type="hidden" name="x_cust_id" value="<?php if ($product_type == 'M') { // membership invoice echo $order_row['user_id']; } else { echo $order_row['employer_id']; } ?> "> <INPUT type="hidden" name="x_relay_response" value="TRUE"> <INPUT type="hidden" name="x_relay_url" value="<?php echo AUTHNET_X_RELAY_URL; ?> "> <INPUT type="hidden" name="x_invoice_num" value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> "> <INPUT type="hidden" name="x_description" value="<?php echo JB_escape_html(JB_SITE_NAME); ?> "> <INPUT type="hidden" name="x_show_form" value="PAYMENT_FORM"> <?php if (AUTHNET_TEST_MODE == 'YES') { ?> <INPUT type="hidden" name="x_test_request" value="TRUE"> <?php } else { ?> <INPUT type="hidden" name="x_test_request" value="FALSE"> <?php } ?> <INPUT type="submit" value="<?php echo $label['pay_by_authnet_button']; ?> "> </FORM> </center> <!-- automatically submit the payment button --> <script type="text/javascript"> function js_submit_payment() { var form = document.getElementById('payment_button'); form.submit(); } window.onload = js_submit_payment; </script> <?php }
function process_payment_return() { global $label; if ($_REQUEST['order_id'] != '' && $_REQUEST['nhezk5'] != '') { $invoice_id = jb_strip_order_id($_REQUEST['order_id']); $product_type = substr($invoice_id, 0, 1); // 'P' or 'S' $invoice_id = substr($invoice_id, 1); if ($_SESSION['JB_ID'] == '') { echo "Error: You must be logged in to view this page"; JBPLUG_do_callback('pay_trn_verification_failed', $invoice_id, $product_type); } else { JBPLUG_do_callback('pay_trn_verification_passed', $invoice_id, $product_type); ?> <div style='background-color: #ffffff; border-color:#C0C0C0; border-style:solid;padding:10px'> <p align="center"><center> <?php if ($product_type == 'P') { $sql = "SELECT * from package_invoices where invoice_id='" . jb_escape_sql($invoice_id) . "' and employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } elseif ($product_type == 'S') { $sql = "SELECT * from subscription_invoices where invoice_id='" . jb_escape_sql($invoice_id) . "' and employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } elseif ($product_type == 'M') { $sql = "SELECT * from membership_invoices where invoice_id='" . jb_escape_sql($invoice_id) . "' and user_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } $result = JB_mysql_query($sql) or die(mysql_error() . $sql); $order_row = mysql_fetch_array($result, MYSQL_ASSOC); if (BANK_TAX_RATE > 0) { if (BANK_ADD_TAX != 'Y') { // taxes included in prices // work out the tax paid in the amount $tax = $order_row['amount'] - $order_row['amount'] / (1.0 + BANK_TAX_RATE); } else { $tax = $order_row['amount'] * BANK_TAX_RATE; $order_row['amount'] = $order_row['amount'] + $tax; // update the amount on the invoice row if (!does_field_exist("package_invoices", "invoice_tax")) { $sql = "ALTER TABLE `package_invoices` ADD `invoice_tax` FLOAT NOT NULL DEFAULT '0';"; mysql_query($sql) or die($sql . mysql_error()); $sql = "ALTER TABLE `subscription_invoices` ADD `invoice_tax` FLOAT NOT NULL DEFAULT '0';"; mysql_query($sql) or die($sql . mysql_error()); $sql = "ALTER TABLE `membership_invoices` ADD `invoice_tax` FLOAT NOT NULL DEFAULT '0';"; mysql_query($sql) or die($sql . mysql_error()); } if ($product_type == 'P') { $sql = "UPDATE package_invoices SET invoice_tax='" . (0 - $tax) . "', amount = amount + '" . jb_escape_sql($order_row['amount']) . "' WHERE invoice_id='" . jb_escape_sql($invoice_id) . "' and employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "' AND invoice_tax != '' "; } elseif ($product_type == 'S') { $sql = "UPDATE subscription_invoices SET invoice_tax='" . (0 - $tax) . "', amount = amount + '" . jb_escape_sql($order_row['amount']) . "' WHERE invoice_id='" . jb_escape_sql($invoice_id) . "' and employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "' AND invoice_tax != ''"; } elseif ($product_type == 'M') { $sql = "UPDATE membership_invoices SET invoice_tax='" . (0 - $tax) . "', amount = amount + '" . jb_escape_sql($order_row['amount']) . "' WHERE invoice_id='" . jb_escape_sql($invoice_id) . "' and user_id='" . jb_escape_sql($_SESSION['JB_ID']) . "' AND invoice_tax != ''"; } } } if (BANK_ADVANCE_CREDIT == 'YES' && strtolower($order_row['status']) != 'pending') { // place the order as 'pending' and advance the credits if ($product_type == 'P') { // posting credits $order_row = JB_pend_package_invoice($invoice_id, $payment_method = 'bank', $pending_reason = 'jb_credit_advanced'); // credit the points to the customer's account JB_add_posting_credits($order_row); } if ($product_type == 'S') { // subscription to view resumes $order_row = JB_pend_subscription_invoice($invoice_id, $payment_method = 'bank', $pending_reason = 'jb_credit_advanced'); JB_start_employer_subscription($order_row); } if ($product_type == 'M') { // membership $order_row = JB_pend_membership_invoice($invoice_id, $payment_method = 'bank', $pending_reason = 'jb_credit_advanced'); JB_start_membership($order_row); } JBPLUG_do_callback('pay_trn_pending', $invoice_id, $product_type); } $bank_amount = JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], BANK_CURRENCY); $bank_amount = JB_format_currency($bank_amount, BANK_CURRENCY, true); $label['payment_bank_heading'] = str_replace("%INVOICE_AMOUNT%", $bank_amount, $label['payment_bank_heading']); $label['payment_bank_note'] = str_replace("%CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $label['payment_bank_note']); $label['payment_bank_note'] = str_replace("%INVOICE_CODE%", $product_type . $invoice_id, $label['payment_bank_note']); $label['payment_bank_tax'] = str_replace("%INVOICE_TAX%", JB_format_currency($tax, BANK_CURRENCY, true), $label['payment_bank_tax']); if (JB_get_default_currency() != BANK_CURRENCY) { echo JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']) . " = " . $bank_amount; echo "<br>"; } ?> <table width="70%"><tr><td> <?php if (BANK_TAX_RATE > 0) { ?> <b><?php echo $label['payment_bank_tax']; ?> </b><br> <?php } ?> <b><?php echo $label['payment_bank_heading']; ?> </b><br> <?php if (BANK_NAME != '') { ?> <b><?php echo $label['payment_bank_name']; ?> </b> <?php echo BANK_NAME; ?> <br> <?php } ?> <?php if (BANK_ADDRESS != '') { ?> <b><?php echo $label['payment_bank_addr']; ?> </b> <?php echo BANK_ADDRESS; ?> <br> <?php } ?> <?php if (BANK_ACCOUNT_NAME != '') { ?> <b><?php echo $label['payment_bank_ac_name']; ?> </b> <?php echo BANK_ACCOUNT_NAME; ?> <br> <?php } ?> <?php if (BANK_ACCOUNT_NUMBER != '') { ?> <b><?php echo $label['payment_bank_ac_number']; ?> </b> <?php echo BANK_ACCOUNT_NUMBER; ?> <br> <?php } ?> <?php if (BANK_BRANCH_NUMBER != '') { ?> <b><?php echo $label['payment_bank_branch_number']; ?> </b> <?php echo BANK_BRANCH_NUMBER; ?> <br> <?php } ?> <?php if (BANK_SWIFT != '') { ?> <b><?php echo $label['payment_bank_swift']; ?> </b> <?php echo BANK_SWIFT; ?> <br> <?php } ?> <?php echo $label['payment_bank_note']; ?> </td></tr> </table> </p> </center> </div> <?php if ($order_row['user_type'] == 'C') { $sql = "Select * from users where ID='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } else { $sql = "Select * from employers where ID='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } $result = JB_mysql_query($sql) or die(mysql_error()); $e_row = mysql_fetch_array($result, MYSQL_ASSOC); if ($product_type == 'P') { $template_r = JB_get_email_template(60, $_SESSION['LANG']); $template = mysql_fetch_array($template_r); $msg = $template['EmailText']; $from = $template['EmailFromAddress']; $from_name = $template['EmailFromName']; $subject = $template['EmailSubject']; $to = $e_row['Email']; $to_name = jb_get_formatted_name($e_row['FirstName'], $e_row['LastName']); $msg = str_replace("%INVOICE_TAX%", JB_format_currency($tax, BANK_CURRENCY, true), $msg); $msg = str_replace("%FNAME%", $e_row['FirstName'], $msg); $msg = str_replace("%LNAME%", $e_row['LastName'], $msg); $msg = str_replace("%SITE_NAME%", JB_SITE_NAME, $msg); $msg = str_replace("%INVOICE_CODE%", "P" . $order_row['invoice_id'], $msg); $msg = str_replace("%QUANTITY%", $order_row['posts_quantity'], $msg); $msg = str_replace("%ITEM_NAME%", $order_row['item_name'], $msg); $msg = str_replace("%INVOICE_AMOUNT%", JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']), $msg); $msg = str_replace("%BANK_NAME%", BANK_NAME, $msg); $msg = str_replace("%BANK_ADDRESS%", BANK_ADDRESS, $msg); $msg = str_replace("%BANK_AC_SWIFT%", BANK_SWIFT, $msg); $msg = str_replace("%BANK_AC_CURRENCY%", BANK_CURRENCY, $msg); $msg = str_replace("%BANK_AC_BRANCH%", BANK_AC_BRANCH, $msg); $msg = str_replace("%AC_NAME%", BANK_ACCOUNT_NAME, $msg); $msg = str_replace("%AC_NUMBER%", BANK_ACCOUNT_NUMBER, $msg); $msg = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $msg); $msg = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $msg); if (BANK_EMAIL_CONFIRM == 'YES') { $email_id = JB_queue_mail($to, $to_name, $from, $from_name, $subject, $msg, '', 60); JB_process_mail_queue(1, $email_id); } } elseif ($product_type == 'S') { // subscription invoice confirmed (id 80) $template_r = JB_get_email_template(80, $_SESSION['LANG']); $template = mysql_fetch_array($template_r); $msg = $template['EmailText']; $from = $template['EmailFromAddress']; $from_name = $template['EmailFromName']; $subject = $template['EmailSubject']; $to = $e_row['Email']; $to_name = jb_get_formatted_name($e_row['FirstName'], $e_row['LastName']); $msg = str_replace("%INVOICE_TAX%", JB_format_currency($tax, BANK_CURRENCY, true), $msg); $msg = str_replace("%FNAME%", $e_row['FirstName'], $msg); $msg = str_replace("%LNAME%", $e_row['LastName'], $msg); $msg = str_replace("%SITE_NAME%", JB_SITE_NAME, $msg); $msg = str_replace("%INVOICE_CODE%", "S" . $order_row['invoice_id'], $msg); $msg = str_replace("%QUANTITY%", $order_row['posts_quantity'], $msg); $msg = str_replace("%ITEM_NAME%", $order_row['item_name'], $msg); $msg = str_replace("%INVOICE_AMOUNT%", JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']), $msg); $msg = str_replace("%BANK_NAME%", BANK_NAME, $msg); $msg = str_replace("%BANK_ADDRESS%", BANK_ADDRESS, $msg); $msg = str_replace("%BANK_AC_SWIFT%", BANK_SWIFT, $msg); $msg = str_replace("%BANK_AC_CURRENCY%", BANK_CURRENCY, $msg); $msg = str_replace("%BANK_AC_BRANCH%", BANK_AC_BRANCH, $msg); $msg = str_replace("%AC_NAME%", BANK_ACCOUNT_NAME, $msg); $msg = str_replace("%AC_NUMBER%", BANK_ACCOUNT_NUMBER, $msg); $msg = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $msg); $msg = str_replace("%SUB_DURATION%", $order_row['months_duration'], $msg); if (BANK_EMAIL_CONFIRM == 'YES') { $email_id = JB_queue_mail($to, $to_name, $from, $from_name, $subject, $msg, '', 80); JB_process_mail_queue(1, $email_id); } } elseif ($product_type == 'M') { // membership invoice confirmed (id 100) $template_r = JB_get_email_template(100, $_SESSION['LANG']); $template = mysql_fetch_array($template_r); $msg = $template['EmailText']; $from = $template['EmailFromAddress']; $from_name = $template['EmailFromName']; $subject = $template['EmailSubject']; $to = $e_row['Email']; $to_name = jb_get_formatted_name($e_row['FirstName'], $e_row['LastName']); $msg = str_replace("%INVOICE_TAX%", JB_format_currency($tax, BANK_CURRENCY, true), $msg); $msg = str_replace("%FNAME%", $e_row['FirstName'], $msg); $msg = str_replace("%LNAME%", $e_row['LastName'], $msg); $msg = str_replace("%SITE_NAME%", JB_SITE_NAME, $msg); $msg = str_replace("%INVOICE_CODE%", "M" . $order_row['invoice_id'], $msg); $msg = str_replace("%INVOICE_CODE%", "M" . $order_row['invoice_id'], $msg); $msg = str_replace("%ITEM_NAME%", $order_row['item_name'], $msg); $msg = str_replace("%INVOICE_AMOUNT%", JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']), $msg); $msg = str_replace("%BANK_NAME%", BANK_NAME, $msg); $msg = str_replace("%BANK_ADDRESS%", BANK_ADDRESS, $msg); $msg = str_replace("%BANK_AC_SWIFT%", BANK_SWIFT, $msg); $msg = str_replace("%BANK_AC_CURRENCY%", BANK_CURRENCY, $msg); $msg = str_replace("%BANK_AC_BRANCH%", BANK_AC_BRANCH, $msg); $msg = str_replace("%AC_NAME%", BANK_ACCOUNT_NAME, $msg); $msg = str_replace("%AC_NUMBER%", BANK_ACCOUNT_NUMBER, $msg); $msg = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $msg); $msg = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $msg); if ($order_row['months_duration'] == '0') { $order_row['months_duration'] = $label['member_not_expire']; } $msg = str_replace("%MEM_DURATION%", $order_row['months_duration'], $msg); if (BANK_EMAIL_CONFIRM == 'YES') { $email_id = JB_queue_mail($to, $to_name, $from, $from_name, $subject, $msg, '', 100); JB_process_mail_queue(1, $email_id); } } JB_update_payment_method($product_type, $order_row['invoice_id'], "bank"); } } else { JBPLUG_do_callback('pay_trn_verification_failed', $invoice_id, $product_type); } }
function payment_button($invoice_id, $product_type) { if (func_num_args() > 1) { $product_type = func_get_arg(1); } if ($product_type == '') { $product_type = 'P'; // posting package } if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($invoice_id); } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($invoice_id); } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($invoice_id); } ?> <form id='payment_button' action="<?php if (NOCHEX_TEST == 'Y') { echo "https://www.nochex.com/nochex.dll/apc/testapc"; } else { echo "https://www.nochex.com/nochex.dll/checkout"; } ?> " name="form1" method="post" target="_parent"> <input type="hidden" value="<?php echo trim(NOCHEX_EMAIL); ?> " name="email"/> <input type="hidden" value="<?php echo number_format(JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], NOCHEX_CURRENCY), 2, '.', ''); ?> " name="amount"/> <input type="hidden" value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> " name="ordernumber" /> <input type="hidden" value="<?php echo jb_escape_html($order_row['item_name']); ?> " name="description" /> <?php if (trim(NOCHEX_LOGO_URL) != '') { ?> <input type="hidden" value="<?php echo NOCHEX_LOGO_URL; ?> " name="logo" /> <?php } ?> <input type="hidden" value="<?php echo trim(NOCHEX_APC_URL); ?> " name="responderurl"/> <?php if ($order_row['user_type'] == 'C') { ?> <input type="hidden" value="<?php echo NOCHEX_CANDIDATE_RETURN_URL; ?> " name="returnurl"/> <?php } else { ?> <input type="hidden" value="<?php echo NOCHEX_RETURN_URL; ?> " name="returnurl"/> <?php } ?> <?php if ($order_row['user_type'] == 'C') { ?> <input type="hidden" value="<?php echo NOCHEX_CANDIDATE_CANCEL_RETURN_URL; ?> " name="cancel"/> <?php } else { ?> <input type="hidden" value="<?php echo NOCHEX_CANCEL_RETURN_URL; ?> " name="cancel"/> <?php } ?> <p align="center"> <input target="_parent" type="image" alt="I accept payment using NOCHEX" src="<?php echo NOCHEX_BUTTON_URL; ?> " border="0" name="submit" /> </P> </p> </form> <!-- automatically submit the payment button --> <script type="text/javascript"> function js_submit_payment() { var form = document.getElementById('payment_button'); form.submit(); } window.onload = js_submit_payment; </script> <?php }
function payment_button($order_id, $product_type) { if (func_num_args() > 1) { $product_type = func_get_arg(1); } if ($product_type == '') { $product_type = 'P'; // posting package } global $label; if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($order_id); } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($order_id); } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($order_id); } ?> <form id="payment_button" action="https://www.e-gold.com/sci_asp/payments.asp" method="post" > <input type="hidden" name="PAYEE_ACCOUNT" value="<?php echo EGOLD_PAYEE_ACCOUNT; ?> "> <input type="hidden" name="PAYEE_NAME" value="<?php echo JB_escape_html(JB_SITE_NAME); ?> "> <input type="hidden" name="PAYMENT_AMOUNT" value="<?php echo JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], $this->get_currency()); ?> "> <input type="hidden" name="PAYMENT_UNITS" value="<?php echo EGOLD_PAYMENT_UNITS; ?> "> <input type="hidden" name="PAYMENT_METAL_ID" value="<?php echo EGOLD_PAYMENT_METAL_ID; ?> "> <input type="hidden" name="PAYMENT_ID" value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> "> <input type="hidden" name="STATUS_URL" value="<?php echo EGOLD_STATUS_URL; ?> "> <?php if ($order_row['user_type'] == 'C') { ?> <input type="hidden" name="PAYMENT_URL" value="<?php echo EGOLD_CANDIDATE_PAYMENT_URL; ?> "> <?php } else { ?> <input type="hidden" name="PAYMENT_URL" value="<?php echo EGOLD_PAYMENT_URL; ?> "> <?php } ?> <input type="hidden" name="PAYMENT_URL_METHOD" value="POST"> <?php if ($order_row['user_type'] == 'C') { ?> <input type="hidden" name="NOPAYMENT_URL" value="<?php echo EGOLD_CANDIDATE_NOPAYMENT_URL; ?> "> <?php } else { ?> <input type="hidden" name="NOPAYMENT_URL" value="<?php echo EGOLD_NOPAYMENT_URL; ?> "> <?php } ?> <input type="hidden" name="NOPAYMENT_URL_METHOD" value="POST"> <input type="hidden" name="BAGGAGE_FIELDS" value="ORDER_NUM CUST_NUM"> <input type="hidden" name="ORDER_NUM" value="<?php echo $order_row['invoice_id']; ?> "> <input type="hidden" name="CUST_NUM" value="<?php if ($product_type == 'M') { echo $order_row['user_id']; } else { echo $order_row['employer_id']; } ?> "> <center> <input type="submit" value="<?php echo $label['pay_by_egold_button']; ?> "> </center> </form> <!-- automatically submit the payment button --> <script type="text/javascript"> function js_submit_payment() { var form = document.getElementById('payment_button'); form.submit(); } window.onload = js_submit_payment; </script> <?php }
function paypal_button($order_row, $product_type) { global $label; ?> <center><b><?php echo $label['payment_paypal_head']; ?> </b> <form id='payment_button' action="https://<?php echo PAYPAL_SERVER; ?> /cgi-bin/webscr" name="form1" method="post" target="_parent"> <center><?php echo $label['payment_paypal_accepts']; ?> </center> <input type="hidden" value="_xclick" name="cmd"> <input type="hidden" value="<?php echo PAYPAL_EMAIL; ?> " name="business"> <input type="hidden" value="<?php echo PAYPAL_IPN_URL; ?> " name="notify_url"> <input type="hidden" value="<?php echo JB_escape_html(JB_SITE_NAME); ?> - <?php echo $order_row['item_name']; ?> " name="item_name"> <?php if ($order_row['user_type'] == 'C') { // candidate ?> <input type="hidden" value="<?php echo PAYPAL_CANDIDATE_RETURN_URL; ?> " name="return"> <?php } else { // employer ?> <input type="hidden" value="<?php echo PAYPAL_RETURN_URL; ?> " name="return"> <?php } ?> <?php if ($order_row['user_type'] == 'C') { // candidate ?> <input type="hidden" value="<?php echo PAYPAL_CANDIDATE_CANCEL_RETURN_URL; ?> " name="cancel_return"> <?php } else { // employer ?> <input type="hidden" value="<?php echo PAYPAL_CANCEL_RETURN_URL; ?> " name="cancel_return"> <?php } ?> <input type="hidden" value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> " name="invoice" > <input type="hidden" value="<?php echo JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], PAYPAL_CURRENCY); ?> " name="amount"> <input type="hidden" value="<?php echo $order_row['invoice_id']; ?> " name="item_number"> <?php if ($order_row['user_id'] > 0) { ?> <input type="hidden" value="<?php echo $order_row['user_id']; ?> " name="custom"> <?php } else { // its made by employer ?> <input type="hidden" value="<?php echo $order_row['employer_id']; ?> " name="custom"> <?php } ?> <input type="hidden" value="<?php echo PAYPAL_PAGE_STYLE; ?> " name="page_style"> <input type="hidden" value="1" name="no_shipping"/> <input type="hidden" value="1" name="no_note"/> <input type="hidden" value="<?php echo PAYPAL_CURRENCY; ?> " name="currency_code"> <p align="center"> <input target="_parent" type="image" alt="<?php echo $label['payment_paypal_bttn_alt']; ?> " src="<?php echo PAYPAL_BUTTON_URL; ?> " border="0" name="submit" > </p> </form> </center> <?php }
function payment_button($order_id, $product_type) { if ($product_type == '') { $product_type = 'P'; // posting package } global $label; if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($order_id); $item_id = $order_row['package_id']; } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($order_id); $item_id = $order_row['subscription_id']; } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($order_id); $item_id = $order_row['membership_id']; } //print_r($order_row); if ($order_row['status'] != 'Confirmed') { // Only Confirmed orders can be sent to checkout. //echo '<a href=""></a>'; return; } if (isset($order_row['employer_id'])) { $user_type = 'E'; $user_id = $order_row['employer_id']; } else { $user_type = 'C'; $user_id = $order_row['user_id']; } $google_msg = $label['payment_google_msg']; $google_msg = str_replace('%CONTACT_EMAIL%', JB_SITE_CONTACT_EMAIL, $google_msg); $args = array('item-name' => $order_row['item_name'], 'item-description' => JB_SITE_NAME . ' - ' . $order_row['item_name'] . ' (' . $product_type . $order_row['invoice_id'] . ')', 'digital-content-description' => $google_msg, 'user_type' => $user_type, 'user_id' => $user_id, 'product_type' => $product_type, 'currency' => GOOGLE_CHECKOUT_CURRENCY, 'unit-price' => JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], GOOGLE_CHECKOUT_CURRENCY), 'item_id' => $item_id, 'product_type' => $product_type, 'merchant-item-id' => $order_row['invoice_id']); // http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Tag_Reference.html#tag_checkout-shopping-cart $res = JB_GoogleCheckoutAPIcall('checkout-shopping-cart', $args); //print_r($res); jb_googc_log_entry('(' . $product_type . $order_row['invoice_id'] . ') - Jamit sent \'checkout-shopping-cart\', Google replied with the following checkout URL:' . $res->{'redirect-url'}); ?> <p style="text-align: center;"> <a href="<?php echo $res->{'redirect-url'}; ?> "> <img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=455364569475924&w=180&h=46&style=white&variant=text&loc=en_US" border="0"> </a> </p> <!-- automatically redirect to the cart --> <script type="text/javascript"> function js_redirect_google() { window.location='<?php echo $res->{'redirect-url'}; ?> ' } window.onload = js_redirect_google; </script> <?php }
function process_payment_return() { global $label; if ($_REQUEST['order_id'] != '' && $_REQUEST['nhezk5'] != '') { $invoice_id = jb_strip_order_id($_REQUEST['order_id']); $product_type = substr($invoice_id, 0, 1); // 'P' or 'S' $invoice_id = substr($invoice_id, 1); if ($_SESSION['JB_ID'] == '') { JBPLUG_do_callback('pay_trn_verification_failed', $invoice_id, $product_type); echo "Error: You must be logged in to view this page"; } else { JBPLUG_do_callback('pay_trn_verification_passed', $invoice_id, $product_type); ?> <div style='background-color: #ffffff; border-color:#C0C0C0; border-style:solid;padding:10px'> <p align="center"><center> <?php if ($product_type == 'P') { $sql = "SELECT * from package_invoices where invoice_id='" . jb_escape_sql($invoice_id) . "' and employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } elseif ($product_type == 'S') { $sql = "SELECT * from subscription_invoices where invoice_id='" . jb_escape_sql($invoice_id) . "' and employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } elseif ($product_type == 'M') { $sql = "SELECT * from membership_invoices where invoice_id='" . jb_escape_sql($invoice_id) . "' and user_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } $result = JB_mysql_query($sql) or die(mysql_error() . $sql); $order_row = mysql_fetch_array($result, MYSQL_ASSOC); if (CHECK_TAX_RATE > 0) { if (CHECK_ADD_TAX != 'Y') { // work out the tax paid in the amount $tax = $order_row['amount'] - $order_row['amount'] / (1.0 + CHECK_TAX_RATE); } else { $tax = $order_row['amount'] * CHECK_TAX_RATE; $order_row['amount'] = $order_row['amount'] + $tax; } } if (CHECK_ADVANCE_CREDIT == 'YES' && strtolower($order_row['status']) != 'pending') { // place the order as 'pending' and advance the credits if ($product_type == 'P') { // posting credits $order_row = JB_pend_package_invoice($invoice_id, $payment_method = 'check', $pending_reason = 'jb_credit_advanced'); // credit the points to the customer's account JB_add_posting_credits($order_row); } if ($product_type == 'S') { // subscription to view resumes $order_row = JB_pend_subscription_invoice($invoice_id, $payment_method = 'check', $pending_reason = 'jb_credit_advanced'); JB_start_employer_subscription($order_row); } if ($product_type == 'M') { // membership $order_row = JB_pend_membership_invoice($invoice_id, $payment_method = 'check', $pending_reason = 'jb_credit_advanced'); JB_start_membership($order_row); } JBPLUG_do_callback('pay_trn_pending', $invoice_id, $product_type); } $check_amount = JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], CHECK_CURRENCY); $check_amount = JB_format_currency($check_amount, CHECK_CURRENCY, true); $label['payment_check_sub_head'] = str_replace("%INVOICE_CODE%", $product_type . $_REQUEST['order_id'], $label['payment_check_sub_head']); echo $label['payment_check_sub_head']; $label['payment_check_heading'] = str_replace("%INVOICE_AMOUNT%", $check_amount, $label['payment_check_heading']); $label['payment_check_tax'] = str_replace("%INVOICE_TAX%", JB_format_currency($tax, CHECK_CURRENCY, true), $label['payment_check_tax']); if (JB_get_default_currency() != CHECK_CURRENCY) { echo JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']) . " = " . $check_amount; echo "<br>"; } ?> <table width="70%"><tr><td> <?php if (CHECK_TAX_RATE > 0) { ?> <b><?php echo $label['payment_check_tax']; ?> </b><br> <?php } ?> <b><?php echo $label['payment_check_heading']; ?> </b><br> <?php if (CHECK_NAME != '') { ?> <b><?php echo $label['payment_check_payable']; ?> </b><pre><?php echo CHECK_PAYABLE; ?> </pre><br> <?php } ?> <?php if (CHECK_ADDRESS != '') { ?> <b><?php echo $label['payment_check_address']; ?> </b><pre><?php echo CHECK_ADDRESS; ?> </pre><br> <?php } ?> <?php /*if ( CHECK_ACCOUNT_NAME != '') { ?> <b><?php echo $label['payment_check_currency'];?></b><pre><?php echo CHECK_CURRENCY; ?></pre><br> <?php } */ ?> </td></tr> </table> </p> </center> </div> <?php if ($order_row['user_type'] == 'C') { $sql = "Select * from users where ID='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } else { $sql = "Select * from employers where ID='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; } $result = JB_mysql_query($sql) or die(mysql_error()); $e_row = mysql_fetch_array($result, MYSQL_ASSOC); if ($product_type == 'S') { $template_r = JB_get_email_template(81, $_SESSION['LANG']); $template = mysql_fetch_array($template_r); $msg = $template['EmailText']; $from = $template['EmailFromAddress']; $from_name = $template['EmailFromName']; $subject = $template['EmailSubject']; $msg = str_replace("%INVOICE_TAX%", JB_format_currency($tax, CHECK_CURRENCY, true), $msg); $msg = str_replace("%FNAME%", $e_row['FirstName'], $msg); $msg = str_replace("%LNAME%", $e_row['LastName'], $msg); $msg = str_replace("%SITE_NAME%", JB_SITE_NAME, $msg); $msg = str_replace("%INVOICE_CODE%", "S" . $order_row['invoice_id'], $msg); $msg = str_replace("%ITEM_NAME%", $order_row['item_name'], $msg); $msg = str_replace("%SUB_DURATION%", $order_row['months_duration'], $msg); $msg = str_replace("%INVOICE_AMOUNT%", JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']), $msg); $msg = str_replace("%PAYEE_NAME%", CHECK_PAYABLE, $msg); $msg = str_replace("%PAYEE_ADDRESS%", CHECK_ADDRESS, $msg); $msg = str_replace("%CHECK_CURRENCY%", CHECK_CURRENCY, $msg); $msg = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $msg); $msg = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $msg); //echo $msg; $to = $e_row['Email']; $to_name = jb_get_formatted_name($e_row['FirstName'], $e_row['LastName']); if (CHECK_EMAIL_CONFIRM == 'YES') { $email_id = JB_queue_mail($to, $to_name, $from, $from_name, $subject, $msg, '', 81); JB_process_mail_queue(1, $email_id); } } elseif ($product_type == 'M') { $template_r = JB_get_email_template(101, $_SESSION['LANG']); $template = mysql_fetch_array($template_r); $msg = $template['EmailText']; $from = $template['EmailFromAddress']; $from_name = $template['EmailFromName']; $subject = $template['EmailSubject']; $msg = str_replace("%INVOICE_TAX%", JB_format_currency($tax, CHECK_CURRENCY, true), $msg); $msg = str_replace("%FNAME%", $e_row['FirstName'], $msg); $msg = str_replace("%LNAME%", $e_row['LastName'], $msg); $msg = str_replace("%SITE_NAME%", JB_SITE_NAME, $msg); $msg = str_replace("%INVOICE_CODE%", "S" . $order_row['invoice_id'], $msg); $msg = str_replace("%ITEM_NAME%", $order_row['item_name'], $msg); if ($order_row['months_duration'] == '0') { $order_row['months_duration'] = $label['member_not_expire']; } $msg = str_replace("%MEM_DURATION%", $order_row['months_duration'], $msg); $msg = str_replace("%INVOICE_AMOUNT%", JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']), $msg); $msg = str_replace("%PAYEE_NAME%", CHECK_PAYABLE, $msg); $msg = str_replace("%PAYEE_ADDRESS%", CHECK_ADDRESS, $msg); $msg = str_replace("%CHECK_CURRENCY%", CHECK_CURRENCY, $msg); $msg = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $msg); $msg = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $msg); //echo $msg; $to = $e_row['Email']; $to_name = jb_get_formatted_name($e_row['FirstName'], $e_row['LastName']); if (CHECK_EMAIL_CONFIRM == 'YES') { $email_id = JB_queue_mail($to, $to_name, $from, $from_name, $subject, $msg, '', 101); JB_process_mail_queue(1, $email_id); } } elseif ($product_type == 'P') { $template_r = JB_get_email_template(61, $_SESSION['LANG']); $template = mysql_fetch_array($template_r); $msg = $template['EmailText']; $from = $template['EmailFromAddress']; $from_name = $template['EmailFromName']; $subject = $template['EmailSubject']; $msg = str_replace("%INVOICE_TAX%", JB_format_currency($tax, CHECK_CURRENCY, true), $msg); $msg = str_replace("%FNAME%", $e_row['FirstName'], $msg); $msg = str_replace("%LNAME%", $e_row['LastName'], $msg); $msg = str_replace("%SITE_NAME%", JB_SITE_NAME, $msg); $msg = str_replace("%INVOICE_CODE%", "P" . $order_row['invoice_id'], $msg); $msg = str_replace("%ITEM_NAME%", $order_row['item_name'], $msg); $msg = str_replace("%QUANTITY%", $order_row['posts_quantity'], $msg); $msg = str_replace("%INVOICE_AMOUNT%", JB_convert_to_default_currency_formatted($order_row['currency_code'], $order_row['amount']), $msg); $msg = str_replace("%PAYEE_NAME%", CHECK_PAYABLE, $msg); $msg = str_replace("%PAYEE_ADDRESS%", CHECK_ADDRESS, $msg); $msg = str_replace("%CHECK_CURRENCY%", CHECK_CURRENCY, $msg); $msg = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $msg); $msg = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $msg); //echo $msg; $to = $e_row['Email']; $to_name = jb_get_formatted_name($e_row['FirstName'], $e_row['LastName']); if (CHECK_EMAIL_CONFIRM == 'YES') { $email_id = JB_queue_mail($to, $to_name, $from, $from_name, $subject, $msg, '', 61); JB_process_mail_queue(1, $email_id); } } JB_update_payment_method($product_type, $order_row['invoice_id'], "check"); } } else { JBPLUG_do_callback('pay_trn_verification_failed', $invoice_id, $product_type); } }
function payment_button($order_id, $product_type) { if (func_num_args() > 1) { $product_type = func_get_arg(1); } if ($product_type == '') { $product_type = 'P'; // posting package } global $label; if ($product_type == 'P') { $order_row = JB_get_product_invoice_row($order_id); } elseif ($product_type == 'S') { $order_row = JB_get_subscription_invoice_row($order_id); } elseif ($product_type == 'M') { $order_row = JB_get_membership_invoice_row($order_id); } ?> <form id="payment_button" action="https://www.moneybookers.com/app/payment.pl" method="post" > <input type="hidden" name="pay_to_email" value="<?php echo MONEYBOOKERS_EMAIL; ?> "> <input type="hidden" name="status_url" value="<?php echo MONEYBOOKERS_STATUS_URL; ?> "> <input type="hidden" name="language" value="<?php echo MONEYBOOKERS_LANGUAGE; ?> "> <input type="hidden" name="transaction_id" value="<?php echo jb_prefix_order_id($product_type . $order_row['invoice_id']); ?> "> <input type="hidden" name="amount" value="<?php echo JB_convert_to_currency($order_row['amount'], $order_row['currency_code'], MONEYBOOKERS_CURRENCY); ?> "> <input type="hidden" name="currency" value="<?php echo MONEYBOOKERS_CURRENCY; ?> "> <?php if ($order_row['user_type'] == 'C') { ?> <input type="hidden" name="cancel_url" value="<?php echo MONEYBOOKERS_CANDIDATE_CANCEL_URL; ?> "> <?php } else { ?> <input type="hidden" name="cancel_url" value="<?php echo MONEYBOOKERS_CANCEL_URL; ?> "> <?php } if ($order_row['user_type'] == 'C') { ?> <input type="hidden" name="return_url" value="<?php echo MONEYBOOKERS_CANDIDATE_RETURN_URL; ?> "> <?php } else { ?> <input type="hidden" name="return_url" value="<?php echo MONEYBOOKERS_RETURN_URL; ?> "> <?php } ?> <input type="hidden" name="detail1_description" value="<?php echo JB_escape_html(JB_SITE_NAME) . " - " . htmlentities($order_row['item_name']); ?> "> <input type="hidden" name="detail1_text" value="<?php echo JB_escape_html(JB_SITE_NAME) . " - " . htmlentities($order_row['item_name']); ?> "> <input type="submit" value="<?php echo $label['pay_by_moneybookers_button']; ?> "> </form> <!-- automatically submit the payment button --> <script type="text/javascript"> function js_submit_payment() { var form = document.getElementById('payment_button'); form.submit(); } window.onload = js_submit_payment; </script> <?php }