/** * This function is used to show the order confirmation. * @param array $arr array of records * @param string $domain domain name * * @return string */ function getPaymentGatewayForms($arr, $domain) { /* $sucess_url='http://'.$_SERVER['SERVER_NAME'].'/?do=paymentgateway&action=success'; $cancel_url='http://'.$_SERVER['SERVER_NAME'].'/?do=paymentgateway&action=failure';*/ $sucess_url = '' . $_SESSION['base_url'] . '/index.php?do=paymentgateway&action=success'; $cancel_url = '' . $_SESSION['base_url'] . '/index.php?do=paymentgateway&action=failure'; $getMerchantId = new Core_CAddCart(); $recordSet = $getMerchantId->getPaymentGatewaySettings($arr['gateway_id']); for ($i = 0; $i < count($recordSet); $i++) { if ($recordSet[$i]['setting_name'] == 'Merchant ID') { $merchantid = base64_decode($recordSet[$i]['setting_values']); } } //$amount=$_SESSION['checkout_amount']; $amount = $_SESSION['checkout_amount'] * $_SESSION['currencysetting']['default_currency']['conversion_rate']; //to covert into equivalent dollar values $payment_html['PayPal'] = ' <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" value="_xclick" type="hidden"> <input name="business" value="' . $merchantid . '" type="hidden"> <input name="item_name" value="' . $_SERVER['SERVER_NAME'] . ' Check out" type="hidden"> <input name="amount" value="' . $amount . '" type="hidden"> <input name="no_note" value="once" type="hidden"> <input name="currency_code" value="USD" type="hidden"> <input name="rm" value="2" type="hidden"> <input name="return" value="' . $sucess_url . '&pay_type=1" type="hidden"> <input name="cancel_return" value="' . $cancel_url . '" type="hidden"> <input src="' . $_SESSION['base_url'] . '/images/payment/paypal.jpg" name="submit" alt="PayPal" type="image" border="0" style="height:30;width:100px;"></form>'; $payment_html['e-bullion'] = '<form name="atip" method="post" action="https://atip.e-bullion.com/process.php"> <input type="hidden" name="ATIP_STATUS_URL" value="' . $_SERVER['SERVER_NAME'] . '"> <input type="hidden" name="ATIP_STATUS_URL_METHOD" value="POST"> <input type="hidden" name="ATIP_BAGGAGE_FIELDS" value=""> <input type="hidden" name="ATIP_SUGGESTED_MEMO" value=""> <input type="hidden" name="ATIP_FORCED_PAYER_ACCOUNT" value=""> <input type="hidden" name="ATIP_PAYER_FEE_AMOUNT" value=""> <input type="hidden" name="ATIP_PAYMENT_URL" value="' . $sucess_url . '&pay_type=2"> <input type="hidden" name="ATIP_PAYMENT_URL_METHOD" value="POST"> <input type="hidden" name="ATIP_NOPAYMENT_URL" value="' . $cancel_url . '"> <input type="hidden" name="ATIP_NOPAYMENT_URL_METHOD" value="POST"> <input type="hidden" name="ATIP_PAYMENT_FIXED" value="1"> <input type="hidden" name="ATIP_PAYEE_ACCOUNT" value="' . $merchantid . '"> <input type="hidden" name="ATIP_PAYEE_NAME" value="' . $merchantid . '"> <input type="hidden" name="ATIP_BUTTON" value="1"> <input type="hidden" name="ATIP_PAYMENT_AMOUNT" value="' . $amount . '" size="10"> <input type="hidden" name="ATIP_PAYMENT_UNIT" value="1"> <input type="hidden" name="ATIP_PAYMENT_METAL" value="3"> <input type="image" name="pay" src="' . $_SESSION['base_url'] . '/images/payment/ebullion.jpg" style="height:30;width:100px;"></form>'; $payment_html['e-gold'] = '<form action="https://www.e-gold.com/sci_asp/payments.asp" method=post> <input type=hidden name="PAYMENT_AMOUNT" value="' . $amount . '"> <input type=hidden name="SUGGESTED_MEMO" value = "' . $_SERVER['SERVER_NAME'] . ' Check out"> <input type="hidden" name="PAYEE_ACCOUNT" value="' . $merchantid . '"> <input type="hidden" name="PAYEE_NAME" value="' . $_SERVER['SERVER_NAME'] . '"> <input type=hidden name="PAYMENT_UNITS" value=1> <input type=hidden name="PAYMENT_METAL_ID" value=1> <input type="hidden" name="STATUS_URL" value="mailto:' . $_SERVER['SERVER_NAME'] . '"> <input type="hidden" name="NOPAYMENT_URL" value="' . $cancel_url . '"> <input type="hidden" name="NOPAYMENT_URL_METHOD" value="POST"> <input type="hidden" name="PAYMENT_URL" value="' . $sucess_url . '&pay_type=3"> <input type="hidden" name="PAYMENT_URL_METHOD" value="POST"> <input type="hidden" name="BAGGAGE_FIELDS" value="PROGL"> <input type="hidden" name="PROGL" value="01"> <input type=image src="' . $_SESSION['base_url'] . '/images/payment/egold.jpg" style="height:30;width:100px;"> </form> '; $payment_html['google-checkout'] = ' <!--<form method="POST" action="https://sandbox.google.com/checkout/cws/v2/Merchant/' . $merchantid . '/checkoutForm" accept-charset="utf-8">--><form method="POST" action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/' . $merchantid . '" accept-charset="utf-8"> <input type="hidden" name="item_name_1" value="Payment For Shopping In ' . $_SERVER['SERVER_NAME'] . '"/> <input type="hidden" name="item_description_1" value="Payment For Shopping In ' . $_SERVER['SERVER_NAME'] . '"/> <input type="hidden" name="item_quantity_1" value="1"/> <input type="hidden" name="item_price_1" value="' . $amount . '"/> <input type="hidden" name="item_currency_1" value="USD"/> <input type="hidden" name="ship_method_name_1" value="UPS Ground"/> <input type="hidden" name="ship_method_price_1" value="0.00"/> <input type="hidden" name="tax_rate" value="0.00"/> <input type="hidden" name="tax_us_state" value="NY"/> <input type="hidden" name="_charset_" value=""/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.continue-shopping-url" value="' . $sucess_url . '&pay_type=4"> <input type="image" name="Google Checkout" alt="Fast checkout through Google" src="http://checkout.google.com/buttons/checkout.gif?merchant_id=' . $merchantid . '&w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180"/> </form>'; /*$payment_html['2checkout']=' <form id="form2co" name="form2co" method="post" action="https://www.2checkout.com/2co/buyer/purchase"> <input type="hidden" name="sid" value="'.$arr['merchant_id'].'" /> <input type="hidden" name="cart_order_id" value="100" /> <input type="hidden" name="total" value="'.$amount.'" /><input type="hidden" name="demo" value="Y" /> <input type="hidden" name="fixed" value="Y" /><input type="hidden" name="return_url" value="'.$sucess_url.'" /> <input type="hidden" name="lang" value="en" /> <input type="hidden" name="card_holder_name" value="" /><input type="image" src="../logo_2co.gif" name="submit" alt="2checkout" /> </form>';*/ $payment_html['2checkout'] = ' <form id="form2co" name="form2co" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=show2checkout"> <input type="hidden" name="sid" value="' . $merchantid . '" /> <input type="hidden" name="cart_order_id" value="100" /> <input type="hidden" name="total" value="' . $amount . '" /><!--<input type="hidden" name="demo" value="Y" />--> <INPUT TYPE="HIDDEN" NAME="x_test_request" VALUE="TRUE"> <input type="hidden" name="fixed" value="Y" /><input type="hidden" name="return_url" value="' . $sucess_url . '" /> <input type="hidden" name="lang" value="en" /> <input type="hidden" name="card_holder_name" value="" /><input type="image" src="' . $_SESSION['base_url'] . '/images/payment/payment/2checkout.gif" name="submit" alt="2checkout" style="height:30;width:100px;"/> </form>'; // $payment_html['2checkout']=' <form action="https://www.2checkout.com/checkout/purchase" method="post"> // <p> // <input type="hidden" name="c_prod_1" value="1,7" /> // <input type="hidden" name="c_name_1" value="science fiction book." /> // <input type="hidden" name="c_price_1" value="10.00" /> // <input type="hidden" name="c_description_1" value="This is a science fiction book, 276 pages, second edition." /> // <input type="hidden" name="c_prod_2" value="2,2" /> // <input type="hidden" name="c_price_2" value="20.00" /> // <input type="hidden" name="c_name_2" value="non-fiction book" /> // <input type="hidden" name="c_description_2" value="This is a non-fiction book, 335 pages, first edition." /> // <input type="hidden" name="c_prod_3" value="3,4" /> // <input type="hidden" name="c_price_3" value="30.00" /> // <input type="hidden" name="c_name_3" value="technical book" /> // <input type="hidden" name="c_description_3" value="This is a technical book, 442 pages, third edition." /> // <input type="hidden" name="id_type" value="1" /> // <input type="hidden" name="cart_order_id" value="example_cart_order_id_abc_123" /> // <input type="hidden" name="total" value="230.00" /> // // <input type="hidden" name="sid" value="'.$merchantid.'" /> // <input type="submit" class="submit" name="purchase" value="Buy from 2CO" /> // </p> // </form> '; $payment_html['Authorize.net'] = ' <form id="form2co" name="form2co" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=showauthorizenet"> <INPUT TYPE="HIDDEN" NAME="x_test_request" VALUE="TRUE"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/authorize.gif" name="submit" alt="Authorize.net" style="height:30;width:100px;" /> </form>'; $payment_html['worldpay'] = ' <form id="worldpay" name="worldpay" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=showworldpay"> <input type=hidden name="instId" value="' . $merchantid . '"> <input type=hidden name="cartId" value=" 122 "> <input type=hidden name="amount" value="' . $amount . '"> <input type=hidden name="currency" value="USD"> <input type=hidden name="desc" value="Payment For Shopping In ' . $_SERVER['SERVER_NAME'] . '"> <!--<input type=hidden name="testMode" value="100"> --> <input type="hidden" name="MC_callback" value="' . $sucess_url . '" /> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/worldpay.gif" name="submit" alt="WorldPay" style="height:30;width:100px;"> </form>'; /*$payment_html['worldpay']=' <form action="https://select.worldpay.com/wcc/purchase" method=POST> <input type=hidden name="instId" value="'.$arr['merchant_id'].'"> <input type=hidden name="cartId" value=" 122 "> <input type=hidden name="amount" value="'.$amount.'"> <input type=hidden name="currency" value="USD"> <input type=hidden name="desc" value="Payment For Shopping In '.$_SERVER['SERVER_NAME'].'"> <input type=hidden name="testMode" value="100"> <input type="hidden" name="MC_callback" value="'.$sucess_url.'" /> <input type="image" src="../worldpay.gif" name="submit" alt="WorldPay"> </form> ';*/ if ((!isset($_SESSION['digitalproducts']) || $_SESSION['digitalproducts'] == 0) && (!isset($_SESSION['gift']) || $_SESSION['gift'] == 0)) { $payment_html['Pay in Store'] = ' <form action="' . $sucess_url . '&pay_type=8" method=POST> <input type=hidden name="amount" value="' . $amount . '"> <input type=hidden name="currency" value="USD"> <input type=hidden name="desc" value="Payment For Shopping In ' . $_SERVER['SERVER_NAME'] . '"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/payinstore.gif" name="submit" alt="Pay in Store" style="height:30;width:100px;"> </form> '; } if (!isset($_SESSION['digitalproducts']) || $_SESSION['digitalproducts'] == 0 || (!isset($_SESSION['gift']) || $_SESSION['gift'] == 0)) { $payment_html['Cash on Delivery'] = ' <form action="' . $sucess_url . '&pay_type=9" method=POST> <input type=hidden name="amount" value="' . $amount . '"> <input type=hidden name="currency" value="USD"> <input type=hidden name="desc" value="Payment For Shopping In ' . $_SERVER['SERVER_NAME'] . '"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/cashondelivery.gif" name="submit" alt="Cash On Delivery" style="height:30;width:100px;"> </form> '; } $payment_html['Paymate'] = ' <form action="https://www.paymate.com/PayMate/ExpressPayment?mid=' . $merchantid . '" method="post"> <input type="hidden" name="amt" value="' . $amount . '"> <input type="hidden" name="amt_editable" value="N"> <input type="hidden" name="currency" value="USD"> <input type="hidden" name="ref" value="' . $_SERVER['SERVER_NAME'] . ' Check out"> <input type="hidden" name="return" value="' . $sucess_url . '&pay_type=10"> <input type="hidden" name="popup" value="' . $cancel_url . '"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/paymate.gif" name="submit" alt="Pay with Paymate Express" style="height:30;width:100px;"> </form>'; $payment_html['Moneybookers'] = '<form action="https://www.moneybookers.com/app/payment.pl" target="_blank" method="post" > <input type="hidden" name="pay_to_email" value="' . $merchantid . '"> <input type="hidden" name="merchant_id" value="' . $arr['merchant_id'] . '"> <input type="hidden" name="return_url" value="' . $sucess_url . '&pay_type=11"> <input type="hidden" name="cancel_url" value="' . $cancel_url . '"> <input type="hidden" name="language" value="EN"> <input type="hidden" name="amount" value="' . $amount . '"> <input type="hidden" name="currency" value="USD"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/moneybookers.jpg" name="submit" alt="Money Bookers" style="height:30;width:100px;"> </form>'; $payment_html['PSIGate'] = '<!--<FORM ACTION="https://devcheckout.psigate.com/HTMLPost/HTMLMessenger" METHOD=post>--><FORM ACTION="https://checkout.psigate.com/HTMLPost/HTMLMessenger" METHOD=post> <INPUT TYPE=hidden NAME="MerchantID" VALUE="' . $merchantid . '"> <INPUT TYPE=hidden NAME="ThanksURL" VALUE="' . $sucess_url . '&pay_type=12"> <INPUT TYPE=hidden NAME="NoThanksURL" VALUE="' . $cancel_url . '"> <INPUT TYPE=hidden NAME="PaymentType" VALUE="CC"> <!--<INPUT TYPE=hidden NAME="TestResult" VALUE="1">--> <INPUT TYPE=hidden NAME="OrderID" VALUE=""> <INPUT TYPE=hidden NAME="SubTotal" VALUE="' . $amount . '"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/psigate.gif" name="submit" alt="PSI Gate" style="height:30;width:100px;"> </FORM>'; $payment_html['Strompay'] = '<form method="post" action="https://www.stormpay.com/stormpay/handle_gen.php"> <input type="hidden" name="generic" value="1"> <input type="hidden" name="payee_email" value="' . $merchantid . '" > <input type="hidden" name="product_name" value="Cart"> <input type="hidden" name="user_id" value=1> <input type="hidden" name="amount" value="' . $amount . '"> <input type="hidden" name="quantity" value="1"> <input type="hidden" name="require_IPN" value="1"> <input type="hidden" name="notify_URL" value="' . $domain . '"> <input type="hidden" name="return_URL" value="' . $sucess_url . '&pay_type=13"> <input type="hidden" name="cancel_URL" value="' . $cancel_url . '"> <input type="hidden" name="subject_matter" value="Cart Payment"> <input type=image src="' . $_SESSION['base_url'] . '/images/payment/strompay.jpg" alt="Strompay" style="height:30;width:100px;"> </form>'; /*$payment_html['Alertpay']='<form action="https://www.alertpay.com/PayProcess.aspx" method="post"> <input type="hidden" name="ap_purchasetype" value="Item"> <input type="hidden" name="ap_merchant" value="'.$arr['merchant_id'].'"> <input type="hidden" name="ap_itemname" value="PTYW"> <input type="hidden" name="ap_currency" value="USD"> <input type="hidden" name="ap_returnurl" value="'.$sucess_url.'&pay_type=14"> <input type="hidden" name="ap_quantity" value="1"> <input type="hidden" name="ap_description" value="PTYW"> <input type="hidden" name="ap_amount" value="0.26"> <input type="hidden" name="ap_cancelurl" value="'.$cancel_url.'"> <input type="image" src="images/payment/alertpay.jpeg" alt="Alertpay"> </form>'; */ $payment_html['Alertpay'] = "<form action='https://www.alertpay.com/PayProcess.aspx' method='post'>\n\t\t\t\t\t<input type='hidden' name='ap_purchasetype' value='Item'>\n\t\t\t\t\t<input type='hidden' name='ap_merchant' value='" . $merchantid . "'>\n\t\t\t\t\t<input type='hidden' name='ap_itemname' value='PTYW'>\n\t\t\t\t\t<input type='hidden' name='ap_currency' value='USD'>\n\t\t\t\t\t<input type='hidden' name='ap_returnurl' value='" . $sucess_url . "&pay_type=14'>\n\t\t\t\t\t<input type='image' src='" . $_SESSION['base_url'] . "/images/payment/alertpay.jpeg' style='height:30;width:100px;'>\n\t\t\t\t\t<input type='hidden' name='ap_quantity' value='1'>\n\t\t\t\t\t<input type='hidden' name='ap_description' value='PTYW'>\n\t\t\t\t\t<input type='hidden' name='ap_amount' value='" . $amount . "'>\n\t\t\t\t\t<input type='hidden' name='ap_cancelurl' value='" . $cancel_url . "'>\n\t\t\t\t\t</form>"; /** * Yourpay connect settings: * 1. You need to log into Yourpay. * 2. After you login, click on Customization at the top. * 3. Then click on "Configure your Yourpay Connect." * 4. Enter the URL address for the order page on your web site or the very last page during checkout for your shopping cart. * You can enter multiple address but they need to be separated by a space. * The Order Submission Form field has a limit of 250 characters. * By default Yourpay Connect will display the customer a confirmation page that they can print out for their records. * If you do not create your own thank you and sorry pages then you can enter the address for your web site. For example: http://www.yourdomain.com * You only need to enable "URL is a CGI script" if you want Yourpay to post the data back to your website so you can collect the information using a scripting language like PHP or ASP. * If you do not want customers to see the Yourpay confirmaiton page then you need to enable the auto forwarding option. */ $payment_html['Yourpay'] = '<!--<form action="https://www.staging.linkpointcentral.com/lpcentral/servlet/lppay" method="post">--><form action="https://secure.linkpt.net/lpcentral/servlet/lppay" method="post"> <input type="hidden" name="mode" value="fullpay"> <input type="hidden" name="chargetotal" value="' . $amount . '"> <input type="hidden" name="storename" value="' . $merchantid . '"> <input type="hidden" name="txntype" value="sale"> <input type="hidden" name="comments" value="' . $domain . '-Buy cart"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/yourpay.jpeg" alt="Yourpay" style="height:30;width:100px;"> <!--<input type="submit" name="btnup" value="Yourpay">--> </form>'; $payment_html['iTransact'] = '<form method="post" action="https://secure.paymentclearing.com/cgi-bin/mas/split.cgi" > <input type="hidden" name="home_page" value="' . $domain . '"> <input type="hidden" name="vendor_id" value="' . $merchantid . '"> <input type="hidden" name="mername" value="Buy Cart"> <input type="hidden" name="ret_addr" value="' . $sucess_url . '&pay_type=16"> <input type="hidden" name="1-qty" value="1" /> <input type="hidden" name="ret_mode" value="post"> <input type="hidden" name="splitType" value="split" /> <input type="hidden" name="1-cost" value="' . round($amount) . '" /> <input type="hidden" name="1-desc" value="Item" /> <input type="hidden" name="first_name" value="venkat" /> <input type="hidden" name="last_name" value="venkat"/> <input type="hidden" name="address" value="vilacheri"/> <input type="hidden" name="city" value="madurai"/> <input type="hidden" name="phone" value="34343434"/> <input type="hidden" name="country" value="USA"/> <input type="hidden" name="email" value="' . $merchantid . '"/> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/itransact.gif" alt="submit securely" style="height:30;width:100px;"/> </form>'; $payment_html['Bluepay'] = ' <form id="formbluepay" name="formbluepay" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=showbluepay"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/bluepay.jpeg" name="submit" alt="BluePay" style="height:30;width:100px;"/> </form>'; if ($arr['gateway_id'] == '17') { $_SESSION['bluepaydetails'] = $merchantid . '|' . $sucess_url . '|' . $cancel_url; } $payment_html['Safepay'] = '<form action="https://www.safepaysolutions.com/index.php" method="post"> <input type="hidden" name="_ipn_act" value="_ipn_payment"> <input type="hidden" name="fid" value="' . $merchantid . '"> <input type="hidden" name="itestmode" value="off"> <input type="hidden" name="notifyURL" value="' . $sucess_url . '&pay_type=18"> <input type="hidden" name="returnURL" value="' . $sucess_url . '&pay_type=18" > <input type="hidden" name="cancelURL" value="' . $cancel_url . '" > <input type="hidden" name="notifyEml" value=""> <input type="hidden" name="iowner" value=""> <input type="hidden" name="ireceiver" value=""> <input type="hidden" name="iamount" value="' . round($amount) . '"> <input type="hidden" name="itemName" value="Deposit Amount"> <input type="hidden" name="itemNum" value=""> <input type="hidden" name="idescr" value=""> <input type="hidden" name="idelivery" value=""> <input type="hidden" name="iquantity" value=""> <input type="hidden" name="imultiplyPurchase" value="y"> <input type="hidden" name="colortheme" value="LightBlueYellow"> <input type="image" src="' . $_SESSION['base_url'] . '/images/payment/safepay.gif" alt="Pay through SafePay Solutions" style="height:30;width:100px;"> </form>'; return $payment_html[$arr['gateway_name']]; }