Example #1
0
 function after_processing_html($orderID)
 {
     $res = '';
     $order = ordGetOrder($orderID);
     $order_amount = roundf(PaymentModule::_convertCurrency($order['order_amount'], 0, $this->_getSettingValue('CONF_CHRONOPAY_CURCODE')));
     $currency = currGetCurrencyByID($this->_getSettingValue('CONF_CHRONOPAY_CURCODE'));
     $zone_iso2 = $order['billing_state'];
     $countries = cnGetCountries(array('offset' => 0, 'CountRowOnPage' => 1000000), $count_row);
     foreach ($countries as $country) {
         if ($country['country_name'] == $order['billing_country']) {
             $country_iso3 = $country['country_iso_3'];
             $zones = znGetZones($country['countryID']);
             foreach ($zones as $zone) {
                 if ($zone['zone_name'] == $zone_iso2) {
                     $zone_iso2 = $zone['zone_code'];
                     break;
                 }
             }
             break;
         }
     }
     $post_1 = array('product_id' => $this->_getSettingValue('CONF_CHRONOPAY_PRODUCT_ID'), 'product_name' => CONF_SHOP_NAME, 'product_price' => $order_amount, 'product_price_currency' => $currency['currency_iso_3'], 'f_name' => $order['billing_firstname'], 's_name' => $order['billing_lastname'], 'street' => $order['billing_address'], 'city' => $order['billing_city'], 'state' => $zone_iso2, 'country' => $country_iso3, 'email' => $order['customer_email'], 'cb_url' => getTransactionResultURL('success'), 'cb_type' => 'P', 'decline_url' => getTransactionResultURL('failure'));
     $hidden_fields_html = '';
     reset($post_1);
     while (list($k, $v) = each($post_1)) {
         $hidden_fields_html .= '<input type="hidden" name="' . $k . '" value="' . $v . '" />' . "\n";
     }
     $res = '
                             <form method="post" action="' . xHtmlSpecialChars($this->processing_url) . '" style="text-align:center;">
                                     ' . $hidden_fields_html . '
                                     <input type="submit" value="' . CHRONOPAY_TXT_SUBMIT . '" />
                             </form>
                             ';
     return $res;
 }
Example #2
0
 function after_processing_html($orderID)
 {
     $res = '';
     $order = ordGetOrder($orderID);
     $order_amount = roundf(PaymentModule::_convertCurrency($order['order_amount'], 0, $this->_getSettingValue('CONF_YANDEXCPP_TRANSCURRENCY')));
     $post_1 = array('TargetCurrency' => $this->_getSettingValue('CONF_YANDEXCPP_TARGETCURRENCY'), 'currencyID' => $this->_getSettingValue('CONF_YANDEXCPP_TARGETCURRENCY'), 'wbp_InactivityPeriod' => '2', 'wbp_ShopAddress' => 'wn1.paycash.ru:8828', 'wbp_ShopEncryptionKey' => 'hAAAEicBAHV6wr3pySqE3thhKHbjvyf4XCMxKc2nSj2u8K46i0dMIP8Wd2KJHkZuhGMWZGmYAp6wsb3XqZW5HKVpamQt+t9rwGNsSaVfeZb9DM5aodCpIMHhLA8gGPDIiG4+Q15X/7Zm3MJNGavZ8+eWAnlvS1M7c6eeLTNJ0CKIYd1yHXfU', 'wbp_ShopKeyID' => '4060341894', 'wbp_Version' => '1.0', 'wbp_CorrespondentID' => '8994748E663DE6B3C68D2D9931B079C74789D4B4', 'BankID' => $this->_getSettingValue('CONF_YANDEXCPP_BANKID'), 'TargetBankID' => $this->_getSettingValue('CONF_YANDEXCPP_TARGETBANKID'), 'PaymentTypeCD' => 'PC', 'ShopID' => $this->_getSettingValue('CONF_YANDEXCPP_SHOPID'), 'CustomerNumber' => $orderID, 'Sum' => $order_amount, 'CustName' => $order['shipping_firstname'] . ' ' . $order['shipping_lastname'], 'CustAddr' => '', 'CustEMail' => $order['customer_email'], 'OrderDetails' => '');
     $order_content = ordGetOrderContent($orderID);
     foreach ($order_content as $item) {
         $post_1['OrderDetails'] .= $item['name'] . "\r\n";
     }
     $implAddress = array('shipping_country', 'shipping_state', 'shipping_city', 'shipping_address');
     foreach ($implAddress as $k) {
         if ($order[$k]) {
             $post_1['CustAddr'] .= ', ' . $order[$k];
         }
     }
     $post_1['CustAddr'] = substr($post_1['CustAddr'], 1);
     $hidden_fields_html = '';
     reset($post_1);
     while (list($k, $v) = each($post_1)) {
         $hidden_fields_html .= '<input type="hidden" name="' . $k . '" value="' . $v . '" />' . "\n";
     }
     $processing_url = $this->_getSettingValue('CONF_YANDEXCPP_MODE') == 'test' ? 'http://demomoney.yandex.ru/select-wallet.xml' : 'http://money.yandex.ru/select-wallet.xml';
     $res = '
                             <form method="post" action="' . xHtmlSpecialChars($processing_url) . '" style="text-align:center;" id="payform">
                                     ' . $hidden_fields_html . '
                             </form><table cellspacing="0" cellpadding="0" class="fsttab"><tr><td><table cellspacing="0" cellpadding="0" class="sectb"><tr><td><a href="#" onclick="document.getElementById(\'payform\').submit(); return false">' . STRING_PAY_NOW . '</a></td></tr></table></td></tr></table>';
     return $res;
 }
Example #3
0
 function after_payment_php($orderID, $params)
 {
     $res = '';
     $order = ordGetOrder($orderID);
     $skey = $this->_getSettingValue('CONF_ZP_MERCHANT_KEY');
     $merch_bd = strtoupper($this->_getSettingValue('CONF_ZP_LMI_PAYEE_PURSE'));
     if ($this->_getSettingValue('CONF_ZP_SHOPCURRENCY') > 0) {
         $exhange_curr = currGetCurrencyByID($this->_getSettingValue('CONF_ZP_SHOPCURRENCY'));
         $exhange_rate = $exhange_curr["currency_value"];
         $exhange_round = $exhange_curr["roundval"];
     } else {
         $exhange_rate = 1;
         $exhange_round = 2;
     }
     if ((double) $exhange_rate == 0) {
         $exhange_rate = 1;
     }
     $order_amount = _formatPrice(roundf($order["order_amount"] * $exhange_rate), $exhange_round, ".", "");
     $OutSum_x = _formatPrice($params["LMI_PAYMENT_AMOUNT"], $exhange_round, ".", "");
     $crc = strtoupper(md5($merch_bd . $params["LMI_PAYMENT_AMOUNT"] . $params["LMI_PAYMENT_NO"] . $params["LMI_MODE"] . $params["LMI_SYS_INVS_NO"] . $params["LMI_SYS_TRANS_NO"] . $params["LMI_SYS_TRANS_DATE"] . $skey . $params["LMI_PAYER_PURSE"] . $params["LMI_PAYER_WM"]));
     if ($order_amount > 0 && $merch_bd == strtoupper($params["LMI_PAYEE_PURSE"]) && $OutSum_x == $order_amount && $crc == strtoupper($params["LMI_HASH"])) {
         ostSetOrderStatusToOrder($order["orderID"], $this->_getSettingValue('CONF_ZP_STATUS_AFTER_PAY'));
         $res = "YES";
     }
     return $res;
 }
Example #4
0
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     //get order amount
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_VERISIGNLINK_USD_CURRENCY') > 0) {
         $curr = currGetCurrencyByID($this->_getSettingValue('CONF_PAYMENTMODULE_VERISIGNLINK_USD_CURRENCY'));
         $curr_rate = $curr["currency_value"];
     }
     if (!isset($curr) || !$curr) {
         $curr_rate = 1;
     }
     $order_amount = roundf($order["order_amount"] * $curr_rate);
     //get billing country ISO 2-chars code
     $q = db_query("select country_iso_3 from " . COUNTRIES_TABLE . " where country_name = '" . $order["billing_country"] . "';");
     $row = db_fetch_row($q);
     if ($row) {
         $bcountry = $row[0];
     } else {
         $bcountry = "";
     }
     $res = "";
     $res .= "<table width='100%'>\n" . "        <tr>\n" . "                <td align='center'>\n" . "<form method='POST' name='verisignLINKform' action='https://payments.verisign.com/payflowlink'>\n" . "<input type=\"hidden\" name=\"LOGIN\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_VERISIGNLINK_LOGIN') . "\">\n" . "<input type=\"hidden\" name=\"PARTNER\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_VERISIGNLINK_PARTNER') . "\">\n" . "<input type=\"hidden\" name=\"AMOUNT\" value=\"" . $order_amount . "\">" . "<input type=\"hidden\" name=\"TYPE\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_VERISIGNLINK_TRANSTYPE') . "\">\n" . "<input type=\"hidden\" name=\"DESCRIPTION\" value=\"Order #{$orderID}\">\n" . "<input type=\"hidden\" name=\"NAME\" value=\"" . $order["billing_firstname"] . " " . $order["billing_lastname"] . "\">\n" . "<input type=\"hidden\" name=\"ADDRESS\" value=\"" . str_replace("\n", "", $order["billing_address"]) . "\">\n" . "<input type=\"hidden\" name=\"CITY\" value=\"" . $order["billing_city"] . "\">\n" . "<input type=\"hidden\" name=\"STATE\" value=\"" . $order["billing_state"] . "\">\n" . "<input type=\"hidden\" name=\"COUNTRY\" value=\"" . $bcountry . "\">\n" . "<input type=\"hidden\" name=\"EMAIL\" value=\"" . $order["customer_email"] . "\">\n" . "<input type=\"submit\" value=\"" . CVERISIGNLINK_TXT_AFTER_PROCESSING_HTML_1 . "\">\n" . "                </form>\n" . "                </td>\n" . "        </tr>\n" . "</table>";
     // xMailTxtHTMLDATA($order["customer_email"], "VeriSign payment", $res);
     return $res;
 }
Example #5
0
 function after_payment_php($orderID, $OutSum, $SignatureValue, $flag)
 {
     $res = '';
     $order = ordGetOrder($orderID);
     if ($this->_getSettingValue('CONF_ROBOXCHANGE_SHOPCURRENCY') > 0) {
         $exhange_curr = currGetCurrencyByID($this->_getSettingValue('CONF_ROBOXCHANGE_SHOPCURRENCY'));
         $exhange_rate = $exhange_curr["currency_value"];
         $exhange_round = $exhange_curr["roundval"];
     } else {
         $exhange_rate = 1;
         $exhange_round = 2;
     }
     if ((double) $exhange_rate == 0) {
         $exhange_rate = 1;
     }
     $order_amount = _formatPrice(roundf($order["order_amount"] * $exhange_rate), $exhange_round, ".", "");
     if ($flag == "result") {
         $mrh_pass = $this->_getSettingValue('CONF_ROBOXCHANGE_MERCHANTPASS2');
     } else {
         $mrh_pass = $this->_getSettingValue('CONF_ROBOXCHANGE_MERCHANTPASS1');
     }
     $OutSum_x = _formatPrice($OutSum, $exhange_round, ".", "");
     $my_crc = strtoupper(md5($OutSum . ":" . $orderID . ":" . $mrh_pass));
     if ($order_amount > 0 && $my_crc == strtoupper($SignatureValue) && $OutSum_x == $order_amount) {
         ostSetOrderStatusToOrder($order["orderID"], $this->_getSettingValue('CONF_ROBOXCHANGE_STATUS_AFTER_PAY'));
         $res = "OK" . $orderID;
     }
     return $res;
 }
Example #6
0
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     $order_amount = round(100 * $order["order_amount"] * $order["currency_value"]) / 100;
     $res = "";
     $res .= "<table width='100%'>\n" . "        <tr>\n" . "                <td align='center'>\n" . "<form method='POST' action='https://www.moneybookers.com/app/send.pl'>\n" . "<input type=\"hidden\" name=\"pay_to_email\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_MONEYBOOKERS_MERCHANT_EMAIL') . "\">\n" . "<input type=\"hidden\" name=\"return_url\" value=\"" . getTransactionResultURL('success') . "\">\n" . "<input type=\"hidden\" name=\"cancel_url\" value=\"" . getTransactionResultURL('failure') . "\">\n" . "<input type=\"hidden\" name=\"status_url\" value=\"mailto:" . $this->_getSettingValue('CONF_PAYMENTMODULE_MONEYBOOKERS_MERCHANT_EMAIL') . "\">\n" . "<input type=\"hidden\" name=\"language\" value=\"EN\">\n" . "<input type=\"hidden\" name=\"detail1_description\" value=\"Order #\">\n" . "<input type=\"hidden\" name=\"detail1_text\" value=\"" . $orderID . "\">\n" . "<input type=\"hidden\" name=\"transaction_id\" value=\"" . $orderID . "\">\n" . "<input type=\"hidden\" name=\"amount\" value=\"" . $order_amount . "\">\n" . "<input type=\"hidden\" name=\"currency\" value=\"" . $order["currency_code"] . "\">\n" . "<input type=\"hidden\" name=\"firstname\" value=\"" . $order["billing_firstname"] . "\">\n" . "<input type=\"hidden\" name=\"lastname\" value=\"" . $order["billing_lastname"] . "\">\n" . "<input type=\"hidden\" name=\"address\" value=\"" . $order["billing_address"] . "\">\n" . "<input type=\"hidden\" name=\"City\" value=\"" . $order["billing_city"] . "\">\n" . "<input type=\"hidden\" name=\"confirmation_note\" value=\"Thank you for your order!\">\n" . "<input type=\"submit\" value=\"" . CMONEYBOOKERS_TXT_AFTER_PROCESSING_HTML_1 . "\">\n" . "                </td>\n" . "        </tr>\n" . "</table>";
     return $res;
 }
Example #7
0
File: paypal.php Project: gblok/rsc
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     $order_amount = round(100 * $order["order_amount"] * $order["currency_value"]) / 100;
     $res = "";
     $res .= "<table width='100%'>\n" . "\t<tr>\n" . "\t\t<td align='center'>\n" . "<form method='POST' name='PayPalForm' action='https://www.paypal.com/cgi-bin/webscr'>\n" . "<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n" . "<input type=\"hidden\" name=\"business\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_PAYPAL_MERCHANT_EMAIL') . "\">\n" . "<input type=\"hidden\" name=\"item_name\" value=\"Order #" . $orderID . "\">\n" . "<input type=\"hidden\" name=\"amount\" value=\"" . $order_amount . "\">\n" . "<input type=\"hidden\" name=\"bn\" value=\"shopcms\">\n" . "<input type=\"hidden\" name=\"return\" value=\"" . getTransactionResultURL('success') . "\">\n" . " <input type=\"hidden\" name=\"currency_code\" value=\"" . $order["currency_code"] . "\">\n" . "<input type=\"image\" name=\"submit\" src=\"http://images.paypal.com/images/x-click-but01.gif\" alt=\"" . CPAYPAL_TXT_AFTER_PROCESSING_HTML_1 . "\">\n" . "\t\t</td>\n" . "\t</tr>\n" . "</table>";
     //			$res .= "<script>document.PayPalForm.submit();</script>";
     return $res;
 }
Example #8
0
File: assist.php Project: gblok/rsc
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     //calculate order amount
     $order_amount = round(100 * $order["order_amount"] * $order["currency_value"]) / 100;
     $res = "";
     $res .= "<table width='100%'>\n" . "        <tr>\n" . "                <td align='center'>\n" . "                <FORM NAME=\"form1\" ACTION=\"https://secure.assist.ru/shops/cardpayment.cfm\" METHOD=\"POST\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Shop_IDP\" VALUE=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_ASSIST_MERCHANT_ID') . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Order_IDP\" VALUE=\"" . $orderID . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Subtotal_P\" VALUE=\"" . $order_amount . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Delay\" VALUE=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_ASSIST_AUTHORIZATION_MODE') . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Language\" VALUE=\"0\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"URL_RETURN_OK\" VALUE=\"" . getTransactionResultURL('success') . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"URL_RETURN_NO\" VALUE=\"" . getTransactionResultURL('failure') . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Currency\" VALUE=\"" . $order["currency_code"] . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Comment\" VALUE=\"Оплата заказа #" . $orderID . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"LastName\" VALUE=\"" . str_replace("\"", "&qout;", $order["billing_lastname"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"FirstName\" VALUE=\"" . str_replace("\"", "&qout;", $order["billing_firstname"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Email\" VALUE=\"" . str_replace("\"", "&qout;", $order["customer_email"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Address\" VALUE=\"" . str_replace("\"", "&qout;", $order["billing_address"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"Country\" VALUE=\"" . str_replace("\"", "&qout;", $order["billing_country"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"State\" VALUE=\"" . str_replace("\"", "&qout;", $order["billing_state"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"City\" VALUE=\"" . str_replace("\"", "&qout;", $order["billing_city"]) . "\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"IsFrame\" VALUE=\"1\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"f_Email\" VALUE=\"0\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"CardPayment\" VALUE=\"1\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"WalletPayment\" VALUE=\"0\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"WebMoneyPayment\" VALUE=\"0\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"RapidaPayment\" VALUE=\"1\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"PayCashPayment\" VALUE=\"0\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"EPortPayment\" VALUE=\"1\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"KreditPilotPayment\" VALUE=\"1\">\n" . "                <INPUT TYPE=\"HIDDEN\" NAME=\"AssistIDCCPayment\" VALUE=\"1\">\n" . "                <INPUT TYPE=\"SUBMIT\" NAME=\"Submit\" VALUE=\"Оплатить заказ по кредитной карте сейчас!\" onclick=\"document.all.Submit.disabled=true; document.form1.submit();\">\n" . "                </FORM>\n" . "                </td>\n" . "        </tr>\n" . "</table>";
     /*
     var_dump($res);
     exit;*/
     return $res;
 }
Example #9
0
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_MALSE_CURR_TYPE') > 0) {
         $MCcurr = currGetCurrencyByID($this->_getSettingValue('CONF_PAYMENTMODULE_MALSE_CURR_TYPE'));
     } else {
         $MCcurr = array("currency_value" => 1);
     }
     $order_amount = round(100 * $order["order_amount"] * $MCcurr["currency_value"]) / 100;
     $res = "";
     $res .= "<table width='100%'>\n" . "\t<tr>\n" . "\t\t<td align='center'>\n" . "<form method='POST' action='http://www.aitsafe.com/cf/addmulti.cfm'>\n" . "<input type=\"hidden\" name=\"userid\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_MALSE_USERID') . "\">\n" . "<INPUT TYPE=\"HIDDEN\" NAME=\"qty1\">" . "<INPUT TYPE=\"HIDDEN\" NAME=\"noqty1\" VALUE=1>" . "<INPUT TYPE=\"HIDDEN\" NAME=\"product1\" VALUE=\"Order #" . $orderID . " (" . show_price($order_amount) . ")\">" . "<INPUT TYPE=\"HIDDEN\" NAME=\"price1\" VALUE=\"" . $order_amount . "\">" . "<input type=\"submit\" name=\"submit\" value=\"" . CMALSE_TXT_AFTER_PROCESSING_HTML_1 . "\">\n" . "\t\t</td>\n" . "\t</tr>\n" . "</table>";
     return $res;
 }
Example #10
0
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_2CO_USD_CURRENCY') > 0) {
         $TWOCOcurr = currGetCurrencyByID($this->_getSettingValue('CONF_PAYMENTMODULE_2CO_USD_CURRENCY'));
         $TWOCOcurr_rate = $TWOCOcurr["currency_value"];
     }
     if (!isset($TWOCOcurr) || !$TWOCOcurr) {
         $TWOCOcurr_rate = 1;
     }
     $order_amount = round(100 * $order["order_amount"] * $TWOCOcurr_rate) / 100;
     $res = "";
     $res .= "<table width='100%'>\n" . "        <tr>\n" . "                <td align='center'>\n" . "<form method='POST' name='two_check_out_form' action='https://www.2checkout.com/2co/buyer/purchase'>\n" . "<input type=\"hidden\" name=\"sid\" value=\"" . $this->_getSettingValue('CONF_PAYMENTMODULE_2CHECKOUT_ID') . "\">\n" . "<input type=\"hidden\" name=\"total\" value=\"" . $order_amount . "\">\n" . "<input type=\"hidden\" name=\"cart_order_id\" value=\"" . $orderID . "\">\n" . "<input type=\"hidden\" name=\"card_holder_name\" value=\"" . $order["billing_firstname"] . " " . $order["billing_lastname"] . "\">\n" . "<input type=\"hidden\" name=\"street_address\" value=\"" . $order["billing_address"] . "\">\n" . "<input type=\"hidden\" name=\"city\" value=\"" . $order["billing_city"] . "\">\n" . "<input type=\"hidden\" name=\"state\" value=\"" . $order["billing_state"] . "\">\n" . "<input type=\"hidden\" name=\"country\" value=\"" . $order["billing_country"] . "\">\n" . "<input type=\"hidden\" name=\"email\" value=\"" . $order["customer_email"] . "\">\n" . "<input type=\"hidden\" name=\"ship_street_address\" value=\"" . $order["shipping_address"] . "\">\n" . "<input type=\"hidden\" name=\"ship_city\" value=\"" . $order["shipping_city"] . "\">\n" . "<input type=\"hidden\" name=\"ship_state\" value=\"" . $order["shipping_state"] . "\">\n" . "<input type=\"hidden\" name=\"ship_country\" value=\"" . $order["shipping_country"] . "\">\n" . "<input type=\"hidden\" name=\"c_prod\" value=\"ShopCMS order\">\n" . "<input type=\"hidden\" name=\"id_type\" value=\"2\">\n" . "<input type=\"submit\" value=\"" . C2CHECKOUT_TXT_1 . "\">\n" . "                </form>\n" . "                </td>\n" . "        </tr>\n" . "</table>";
     //                                "<script>document.two_check_out_form.submit();</script>";
     //echo "<pre>".str_replace("<", "&lt;", $res);
     return $res;
 }
    function after_processing_html($orderID)
    {
        $order = ordGetOrder($orderID);
        $order_amount = $order["order_amount"];
        $is_MSIE = isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false ? true : false;
        $res = "";
        $description = str_replace("[orderID]", $orderID, $this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_PAYMENTS_DESC'));
        if ($is_MSIE) {
            $description = translit($description);
        }
        $pay_type = 'card';
        $token = trim($this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_TOKEN'));
        $order_key = $this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_SHARED_SECRET');
        $hash_key = sha1(sha1($orderID) . sha1($order_amount) . sha1($token) . sha1($order_key));
        $framecss = $this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_FRAME_CSS');
        $frameopen = $this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_FRAME_OPEN_MODE');
        $frameborder = $this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_FRAME_BORDER');
        $frameborder = ' frameborder="' . $frameborder . '" ';
        $framescroll = $this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_FRAME_SCROLLING');
        $framescroll = ' scrolling="' . $framescroll . '" ';
        $url = 'https://arsenalpay.ru/payframe/pay.php?
			src=' . $pay_type . '&t=' . $token . '&n=' . $orderID . '&a=' . $order_amount . '&key=' . $hash_key . '&css=' . $framecss . '&frame=' . $frameopen;
        $frame_w = trim($this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_FRAME_WIDTH'));
        if ($frame_w < 200) {
            $frame_w = 200;
        }
        $frame_h = trim($this->_getSettingValue('CONF_PAYMENTMODULE_ARSENALPAY_FRAME_HEIGHT'));
        if ($frame_h < 200) {
            $frame_h = 200;
        }
        $res .= '<br>
			<h3>' . $description . '</h3>
			<h3>Оплата пластиковой картой</h3>

			<iframe src="' . $url . '"  width="' . $frame_w . 'px" height="' . $frame_h . 'px" ' . $framescroll . ' ' . $frameborder . '>
			</iframe>';
        return $res;
    }
Example #12
0
function ordAccessToLoadFile($orderID, $productID, &$pathToProductFile, &$productFileShortName)
{
    $order = ordGetOrder($orderID);
    $product = GetProduct($productID);
    if (strlen($product['eproduct_filename']) == 0 || !file_exists('core/files/' . $product['eproduct_filename']) || $product['eproduct_filename'] == null) {
        return 4;
    }
    if ((int) $order['statusID'] != (int) ostGetCompletedOrderStatus()) {
        return 3;
    }
    $orderContent = ordGetOrderContent($orderID);
    foreach ($orderContent as $item) {
        if (GetProductIdByItemId($item['itemID']) == $productID) {
            if ($item['load_counter'] < $product['eproduct_download_times'] || $product['eproduct_download_times'] == 0) {
                $date1 = dtGetParsedDateTime($order['order_time_mysql']);
                //$order['order_time']
                $date2 = dtGetParsedDateTime(get_current_time());
                $countDay = _getDayBetweenDate($date1, $date2);
                if ($countDay >= $product['eproduct_available_days']) {
                    return 2;
                }
                if ($product['eproduct_download_times'] != 0) {
                    db_query('update ' . ORDERED_CARTS_TABLE . ' set load_counter=load_counter+1 ' . ' where itemID=' . (int) $item['itemID'] . ' AND orderID=' . (int) $orderID);
                }
                $pathToProductFile = 'core/files/' . $product['eproduct_filename'];
                $productFileShortName = $product['eproduct_filename'];
                return 0;
            } else {
                return 1;
            }
        }
    }
    return -1;
}
Example #13
0
/**
 * Add commission to customer from order
 *
 * @param integer - order id
 */
function affp_addCommissionFromOrder($_orderID)
{
    $Commission = affp_getCommissionByOrder($_orderID);
    if ($Commission['cID']) {
        return 0;
    }
    $Order = ordGetOrder($_orderID);
    if ($Order['customerID']) {
        $RefererID = affp_getReferer($Order['customerID']);
    } else {
        $RefererID = $Order['affiliateID'];
    }
    if (!$RefererID) {
        return 0;
    }
    $CustomerLogin = regGetLoginById($Order['customerID']);
    if (!$CustomerLogin) {
        $CustomerLogin = $Order['customer_email'];
    }
    $Commission = array('Amount' => sprintf("%.2f", $Order['currency_value'] * $Order['order_amount'] * CONF_AFFILIATE_AMOUNT_PERCENT / 100), 'CurrencyISO3' => $Order['currency_code'], 'xDateTime' => date("Y-m-d H:i:s"), 'OrderID' => $_orderID, 'CustomerID' => $RefererID, 'Description' => xEscSQL(str_replace(array('{ORDERID}', '{USERLOGIN}'), array($_orderID, $CustomerLogin), AFFP_COMMISSION_DESCRIPTION)));
    do {
        if (CONF_AFFILIATE_EMAIL_NEW_COMMISSION) {
            $Settings = affp_getSettings($RefererID);
            if (!$Settings['EmailOrders']) {
                break;
            }
            $t = '';
            $Email = '';
            $FirstName = '';
            regGetContactInfo(regGetLoginById($RefererID), $t, $Email, $FirstName, $t, $t, $t);
            xMailTxt($Email, AFFP_NEW_COMMISSION, 'customer.affiliate.commission_notifi.tpl', array('customer_firstname' => $FirstName, '_AFFP_MAIL_NEW_COMMISSION' => str_replace('{MONEY}', $Commission['Amount'] . ' ' . $Commission['CurrencyISO3'], AFFP_MAIL_NEW_COMMISSION)));
        }
    } while (0);
    affp_addCommission($Commission);
}
Example #14
0
        die("Заказ не найден в базе данных");
    }
    $sql = '
    SELECT count(*)
    FROM ' . ORDERS_TABLE . '
    orderID=' . $_GET['orderID'] . '
    AND order_time="' . xEscSQL(base64_decode($_GET['order_time'])) . '"
    AND customer_email="' . xEscSQL(base64_decode($_GET['customer_email'])) . '"';
}
$InvoiceModule = modGetModuleObj((int) $_GET['moduleID'], PAYMENT_MODULE);
$_GET["orderID"] = (int) $_GET["orderID"];
$q = db_query($sql);
$row = db_fetch_row($q);
if ($row[0] == 1) {
    //заказ найден в базе данных
    $order = ordGetOrder($_GET["orderID"]);
    //define smarty vars
    $smarty->assign("billing_lastname", $order["customer_lastname"]);
    $smarty->assign("billing_firstname", $order["customer_firstname"]);
    $smarty->assign("billing_city", $order["billing_city"]);
    $smarty->assign("billing_address", $order["billing_address"]);
    if ($InvoiceModule->is_installed()) {
        $smarty->assign('InvoiceModule', $InvoiceModule);
        $smarty->assign("invoice_description", str_replace("[orderID]", (string) $_GET["orderID"], $InvoiceModule->_getSettingValue('CONF_PAYMENTMODULE_INVOICE_PHYS_DESCRIPTION')));
    } else {
        //описание не опред
        die("Модуль оплаты по квитанциям не установлен");
    }
    //сумма квитанции
    $q = db_query("select order_amount_string from " . DB_PRFX . "_module_payment_invoice_phys where orderID=" . $_GET["orderID"]);
    $row = db_fetch_row($q);
Example #15
0
 function after_processing_html($orderID)
 {
     //открыть окно со счетом
     $order = ordGetOrder($orderID);
     if (!$this->ModuleConfigID) {
         $sql = 'SELECT module_id FROM ' . MODULES_TABLE . ' WHERE module_name="' . xEscSQL($this->title) . '"';
         @(list($this->ModuleConfigID) = db_fetch_row(db_query($sql)));
     }
     $res = "";
     $res .= "<script>\n" . "        open_window('index.php?do=invoice_jur&moduleID=" . (int) $this->ModuleConfigID . "&orderID=" . (int) $orderID . "&order_time=" . base64_encode($order["order_time_mysql"]) . "&customer_email=" . base64_encode($order["customer_email"]) . "',700,600);\n" . "</script>\n";
     return $res;
 }
Example #16
0
 function admin_print_html($orderID)
 {
     $order = ordGetOrder($orderID);
     if (!$this->ModuleConfigID) {
         $sql = 'SELECT module_id FROM ' . MODULES_TABLE . ' WHERE module_name="' . xEscSQL($this->title) . '"';
         @(list($this->ModuleConfigID) = db_fetch_row(db_query($sql)));
     }
     $result = 'admin.php?do=invoice_phys&moduleID=' . (int) $this->ModuleConfigID . '&orderID=' . (int) $orderID;
     return $result;
 }
Example #17
0
 function after_processing_html($orderID)
 {
     $orderID = (int) $orderID;
     $order = ordGetOrder($orderID);
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_LINKPOINT_USD_CURRENCY') > 0) {
         $LPcurr = currGetCurrencyByID($this->_getSettingValue('CONF_PAYMENTMODULE_LINKPOINT_USD_CURRENCY'));
         $LPcurr_rate = $LPcurr["currency_value"];
     }
     if (!isset($LPcurr) || !$LPcurr) {
         $LPcurr_rate = 1;
     }
     $order_amount = round(100 * $order["order_amount"] * $LPcurr_rate) / 100;
     $res = "";
     $res .= "<table width='100%'>\n" . "\t<tr>\n" . "\t\t<td align='center'>\n" . "<form method='POST' action='linkpoint.php'>\n" . "<input type=\"hidden\" name=\"chargetotal\" value=\"" . $order_amount . "\">\n";
     foreach ($this->replSettings as $_Sett) {
         $res .= "<input type=\"hidden\" name=\"pSettingsAccordance[" . $_Sett . "]\" value=\"" . $this->_getSettingRealName($_Sett) . "\">\n";
     }
     $res .= "<input type=\"hidden\" name=\"oid\" value=\"" . $orderID . "\">\n" . "<input type=\"submit\" value=\"" . CLINKPOINT_TXT_AFTER_PROCESSING_HTML_1 . "\">\n" . "\t\t</form></td>\n" . "\t</tr>\n" . "</table>\n\n";
     return $res;
 }
Example #18
0
        $orderContent = ordGetOrderContent($orderID);
        $order_status_report = xNl2Br(stGetOrderStatusReport($orderID));
        $order_statuses = ostGetOrderStatues();
        $smarty->assign("completed_order_status", ostGetCompletedOrderStatus());
        $smarty->assign("orderContent", $orderContent);
        $smarty->assign("order", $order);
        $smarty->assign("https_connection_flag", 1);
        $smarty->assign("order_status_report", $order_status_report);
        $smarty->assign("order_statuses", $order_statuses);
        $smarty->assign("order_detailed", 1);
        $smarty->assign("main_content_template", "order_history.tpl");
    }
}
if (isset($p_order_detailed)) {
    $orderID = (int) $p_order_detailed;
    $order = ordGetOrder($orderID);
    if (!$order) {
        header("HTTP/1.0 404 Not Found");
        header("HTTP/1.1 404 Not Found");
        header("Status: 404 Not Found");
        die(ERROR_404_HTML);
    }
    if ($order["customerID"] != regGetIdByLogin($_SESSION["log"])) {
        unset($order);
        Redirect("index.php?register_authorization=yes");
    } else {
        $orderContent = ordGetOrderContent($orderID);
        $order_status_report = xNl2Br(stGetOrderStatusReport($orderID));
        $order_statuses = ostGetOrderStatues();
        $smarty->assign("completed_order_status", ostGetCompletedOrderStatus());
        $smarty->assign("orderContent", $orderContent);
Example #19
0
function stChangeOrderStatus($orderID, $statusID, $comment = '', $notify = 0)
{
    $q_status_name = db_query("select status_name from " . ORDER_STATUES_TABLE . " where statusID=" . (int) $statusID);
    list($status_name) = db_fetch_row($q_status_name);
    $sql = "insert into " . ORDER_STATUS_CHANGE_LOG_TABLE . " ( orderID, status_name, status_change_time, status_comment ) " . " values( " . (int) $orderID . ", '" . xToText($status_name) . "', '" . xEscSQL(get_current_time()) . "', '" . xToText(trim($comment)) . "' ) ";
    db_query($sql);
    if ($notify) {
        $Order = ordGetOrder($orderID);
        $t = '';
        $Email = '';
        $FirstName = '';
        regGetContactInfo(regGetLoginById($Order['customerID']), $t, $Email, $FirstName, $t, $t, $t);
        if (!$Email) {
            $Email = $Order['customer_email'];
        }
        if (!$FirstName) {
            $FirstName = $Order['customer_firstname'];
        }
        xMailTxt($Email, STRING_CHANGE_ORDER_STATUS, 'customer.order.change_status.tpl', array('customer_firstname' => $FirstName, '_MSG_CHANGE_ORDER_STATUS' => str_replace(array('{STATUS}', '{ORDERID}'), array($status_name == 'STRING_CANCELED_ORDER_STATUS' ? STRING_CANCELED_ORDER_STATUS : $status_name, $orderID), MSG_CHANGE_ORDER_STATUS), '_ADMIN_COMMENT' => $comment));
    }
}
Example #20
0
     if (CONF_BACKEND_SAFEMODE) {
         //this action is forbidden when SAFE MODE is ON
         Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=" . $_GET["orderID"] . "&urlToReturn=" . $_GET["urlToReturn"] . "&safemode=yes");
     }
     if ((int) $_POST["status"] != -1) {
         ostSetOrderStatusToOrder((int) $_GET["orderID"], $_POST["status"], isset($_POST['status_comment']) ? $_POST['status_comment'] : '', isset($_POST['notify_customer']) ? $_POST['notify_customer'] : '');
     }
     Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=" . (int) $_GET["orderID"] . "&urlToReturn=" . $_GET["urlToReturn"]);
 }
 if (isset($_GET["urlToReturn"])) {
     $smarty->assign("encodedUrlToReturn", $_GET["urlToReturn"]);
 }
 if (isset($_GET["urlToReturn"])) {
     $smarty->hassign("urlToReturn", base64_decode($_GET["urlToReturn"]));
 }
 $order = ordGetOrder((int) $_GET["orderID"]);
 $orderContent = ordGetOrderContent((int) $_GET["orderID"]);
 $order_status_report = xNl2Br(stGetOrderStatusReport((int) $_GET["orderID"]));
 $order_statuses = ostGetOrderStatues();
 $smarty->assign("cancledOrderStatus", ostGetCanceledStatusId());
 $smarty->assign("orderContent", $orderContent);
 $smarty->assign("order", $order);
 //            $paymentModuleFiles = GetFilesInDirectory("core/modules/payment", "php");
 //
 //
 //            foreach ($paymentModuleFiles as $fileName)
 //                include ( $fileName );
 $paymentMethod = payGetPayModuleID($order['payment_type']);
 $currentPaymentModule = modGetModuleObj($paymentMethod["module_id"], PAYMENT_MODULE);
 if ($currentPaymentModule != null && method_exists($currentPaymentModule, 'admin_print_html')) {
     $admin_print_html = $currentPaymentModule->admin_print_html($order["orderID"]);
Example #21
0
File: w1.php Project: gblok/rsc
 function after_processing_html($orderID)
 {
     $order = ordGetOrder($orderID);
     $exhange_rate = 1;
     $exhange_round = 2;
     $order_amount = _formatPrice(roundf($order["order_amount"] * $exhange_rate), $exhange_round, ".", "");
     $fields = array();
     $fields1 = array();
     $fields["WMI_MERCHANT_ID"] = $this->_getSettingValue('CONF_PAYMENTMODULE_WMI_MERCHANT_ID');
     $fields["WMI_PAYMENT_AMOUNT"] = $order_amount;
     $fields["WMI_CURRENCY_ID"] = $this->_getSettingValue('CONF_PAYMENTMODULE_WMI_CURRENCY_ID');
     $fields["WMI_PAYMENT_NO"] = $orderID;
     $fields["WMI_DESCRIPTION"] = "BASE64:" . base64_encode(str_replace("[orderID]", $orderID, $this->_getSettingValue('CONF_PAYMENTMODULE_WMI_DESCRIPTION')));
     $fields["WMI_SUCCESS_URL"] = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php?transaction_result=success';
     $fields["WMI_FAIL_URL"] = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php?transaction_result=failure';
     $fields["WMI_AUTO_ACCEPT"] = "1";
     // доступные формы оплаты
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_PTENABLED_INTERNET')) {
         $fields1["WalletOneRUB"] = 1;
         $fields1["WalletOneUAH"] = 1;
         $fields1["WalletOneZAR"] = 1;
         $fields1["UkashEUR"] = 1;
         $fields1["MoneyMailRUB"] = 1;
         $fields1["RbkMoneyRUB"] = 1;
         $fields1["ZPaymentRUB"] = 1;
         $fields1["WebCredsRUB"] = 1;
         $fields1["EasyPayBYR"] = 1;
         $fields1["QiwiWalletRUB"] = 1;
         $fields["WMI_PTENABLED"] = 1;
     }
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_PTENABLED_TERMINAL')) {
         $fields1["CashTerminalRUB"] = 1;
         $fields1["CashTerminalUAH"] = 1;
         $fields["WMI_PTENABLED"] = 1;
     }
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_PTENABLED_MCOMMERCE')) {
         $fields1["BeelineRUB"] = 1;
         $fields1["MtsRUB"] = 1;
         $fields1["MegafonRUB"] = 1;
         $fields["WMI_PTENABLED"] = 1;
     }
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_PTENABLED_CARDS')) {
         $fields1["AlfaclickRUB"] = 1;
         $fields1["Privat24UAH"] = 1;
         $fields1["PsbRetailRUB"] = 1;
         $fields1["SvyaznoyBankRUB"] = 1;
         $fields1["BankTransferRUB"] = 1;
         $fields1["BankTransferUAH"] = 1;
         $fields1["BankTransferUSD"] = 1;
         $fields1["BankTransferZAR"] = 1;
         $fields1["BankTransferKZT"] = 1;
         $fields1["CreditCardRUB"] = 1;
         $fields1["LiqPayRUB"] = 1;
         $fields1["LiqPayUSD"] = 1;
         $fields1["LiqPayEUR"] = 1;
         $fields1["LiqPayUAH"] = 1;
         $fields1["NsmepUAH"] = 1;
         $fields["WMI_PTENABLED"] = 1;
     }
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_PTENABLED_NAL')) {
         $fields1["MobileRetailsRUB"] = 1;
         $fields1["SberbankRUB"] = 1;
         $fields1["PrivatbankUAH"] = 1;
         $fields1["RussianPostRUB"] = 1;
         $fields1["ContactRUB"] = 1;
         $fields1["UnistreamRUB"] = 1;
         $fields1["AnelikRUB"] = 1;
         $fields1["LiderRUB"] = 1;
         $fields["WMI_PTENABLED"] = 1;
     }
     // Формирование сообщения, путем объединения значений формы,
     // отсортированных по именам ключей в порядке возрастания.
     uksort($fields, "strcasecmp");
     $fieldValues = "";
     foreach ($fields as $name => $val) {
         if ($name == 'WMI_PTENABLED') {
             uksort($fields1, "strcasecmp");
             foreach ($fields1 as $_i => $_v) {
                 $fieldValues .= $_i;
             }
         } else {
             $fieldValues .= $val;
         }
     }
     // Формирование значения параметра WMI_SIGNATURE, путем
     // вычисления отпечатка, сформированного выше сообщения,
     // по алгоритму MD5 или SHA1 и представление его в Base64
     if ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_HASH_METOD') == 2) {
         $signature = base64_encode(pack("H*", md5($fieldValues . $this->_getSettingValue('CONF_PAYMENTMODULE_WMI_SECRET_KEY'))));
         $fields["WMI_SIGNATURE"] = $signature;
     } elseif ($this->_getSettingValue('CONF_PAYMENTMODULE_WMI_HASH_METOD') == 3) {
         $signature = base64_encode(pack("H*", sha1($fieldValues . $this->_getSettingValue('CONF_PAYMENTMODULE_WMI_SECRET_KEY'))));
         $fields["WMI_SIGNATURE"] = $signature;
     }
     // Формирование HTML-кода платежной формы
     $res = "";
     $res .= "<table width='100%'>\n" . "        <tr>\n" . "                <td align='center'>\n" . "<form method=\"post\" action=\"https://merchant.w1.ru/checkout/default.aspx\" accept-charset=\"UTF-8\" id='payform'>\n";
     foreach ($fields as $key => $val) {
         if ($key == 'WMI_PTENABLED') {
             foreach ($fields1 as $_i => $_v) {
                 $res .= "    <input type=\"hidden\" name=\"WMI_PTENABLED\" value=\"{$_i}\"/>\n";
             }
         } else {
             $res .= "    <input type=\"hidden\" name=\"{$key}\" value=\"{$val}\"/>\n";
         }
     }
     $res .= "        <table cellspacing='0' cellpadding='0' class='fsttab'><tr><td><table cellspacing='0' cellpadding='0' class='sectb'><tr><td><a href='#' onclick='document.getElementById(\"payform\").submit(); return false'>" . STRING_PAY_NOW . "</a></td></tr></table></td></tr></table>\n" . "</form>\n" . "                </td>\n" . "        </tr>\n" . "</table>";
     return $res;
 }
Example #22
0
    }
    $sql = '
    SELECT count(*)
    FROM ' . ORDERS_TABLE . '
    orderID=' . $_GET['orderID'] . '
    AND order_time="' . xEscSQL(base64_decode($_GET['order_time'])) . '"
    AND customer_email="' . xEscSQL(base64_decode($_GET['customer_email'])) . '"';
}
$InvoiceModule = modGetModuleObj((int) $_GET['moduleID'], PAYMENT_MODULE);
$smarty->assign('InvoiceModule', $InvoiceModule);
$_GET['orderID'] = (int) $_GET['orderID'];
$q = db_query($sql);
$row = db_fetch_row($q);
if ($row[0] == 1) {
    //заказ найден в базе данных
    $order = ordGetOrder($_GET['orderID']);
    //order details
    //define smarty vars
    $smarty->assign('billing_name', $order['billing_firstname']);
    $smarty->assign('billing_city', $order['billing_city']);
    $smarty->assign('billing_address', $order['billing_address']);
    $smarty->assign('orderID', $_GET['orderID']);
    $smarty->assign('order_time', $order['order_time']);
    if (!$InvoiceModule->is_installed()) {
        //модуль не установлен
        die('Модуль выписки счетов не установлен');
    }
    //сумма счета
    $sql = 'select company_name, company_inn, nds_included, nds_rate, RUR_rate from ' . DB_PRFX . '_module_payment_invoice_jur where orderID=' . $_GET['orderID'] . ' AND module_id=' . (int) $InvoiceModule->ModuleConfigID;
    $q = db_query($sql);
    $row = db_fetch_row($q);