当前位置: 首页>>代码示例>>PHP>>正文


PHP hikashopPaymentPlugin类代码示例

本文整理汇总了PHP中hikashopPaymentPlugin的典型用法代码示例。如果您正苦于以下问题:PHP hikashopPaymentPlugin类的具体用法?PHP hikashopPaymentPlugin怎么用?PHP hikashopPaymentPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了hikashopPaymentPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onBeforeOrderCreate

 function onBeforeOrderCreate(&$order, &$do)
 {
     if (parent::onBeforeOrderCreate($order, $do) === true) {
         return true;
     }
     if (!function_exists('curl_init')) {
         $this->app->enqueueMessage('The eSelect payment plugin needs the CURL library installed but it seems that it is not available on your server. Please contact your web hosting to set it up.', 'error');
         $do = false;
         return false;
     }
     $this->ccLoad();
     ob_start();
     $dbg = '';
     $amount = number_format($order->cart->full_total->prices[0]->price_value_with_tax, 2, '.', '');
     require_once dirname(__FILE__) . DS . 'eselect_lib.php';
     $txnArray = array('type' => 'purchase', 'order_id' => uniqid(), 'cust_id' => $this->user->user_id, 'amount' => $amount, 'pan' => $this->cc_number, 'expdate' => $this->cc_month . $this->cc_year, 'crypt_type' => '7', 'dynamic_descriptor' => '');
     $mpgTxn = new mpgTransaction($txnArray);
     if ($this->payment_params->ask_ccv) {
         $cvdTemplate = array('cvd_indicator' => 1, 'cvd_value' => $this->cc_CCV);
         $mpgCvdInfo = new mpgCvdInfo($cvdTemplate);
         $mpgTxn->setCvdInfo($mpgCvdInfo);
     }
     $mpgRequest = new mpgRequest($mpgTxn);
     $mpgHttpPost = new mpgHttpsPost($this->payment_params->store_id, $this->payment_params->api_token, $mpgRequest, (int) $this->payment_params->debug != 0);
     $mpgResponse = $mpgHttpPost->getMpgResponse();
     $ret = $mpgResponse->getResponseCode();
     if ($ret !== null && $ret != 'null') {
         $ret = (int) $ret;
         if ($ret < 50 && $mpgResponse->getComplete() == 'true') {
             ob_get_clean();
             ob_start();
             $this->modifyOrder($order, $this->payment_params->verified_status, true, true);
         } else {
             $responseMsg = $mpgResponse->getMessage();
             if (!empty($responseMsg)) {
                 $this->app->enqueueMessage($responseMsg);
             } else {
                 $this->app->enqueueMessage('Eselect/Moneris Response Error');
             }
             $do = false;
         }
     } else {
         if (!empty($mpgHttpPost->curl_err)) {
             $this->app->enqueueMessage($mpgHttpPost->curl_err_msg);
         } else {
             $msg = $mpgResponse->getMessage();
             if (empty($msg)) {
                 $this->app->enqueueMessage('Eselect/Moneris Generic Error');
             } else {
                 $this->app->enqueueMessage('Eselect/Moneris: ' . $msg);
             }
         }
         $do = false;
     }
     if ($do == false) {
         return true;
     }
     $this->ccClear();
     return true;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:60,代码来源:eselect.php

示例2: onAfterOrderConfirm

    function onAfterOrderConfirm(&$order, &$methods, $method_id)
    {
        parent::onAfterOrderConfirm($order, $methods, $method_id);
        if ($this->payment_params->testingMode == true) {
            $this->payment_params->url = "https://sandbox.google.com/checkout/inapp/lib/buy.js";
        } else {
            $this->payment_params->url = "https://wallet.google.com/inapp/lib/buy.js";
        }
        if (empty($this->payment_params->sellerIdentifier)) {
            $this->app->enqueueMessage('You have to configure an seller Identifier for the googlewallet plugin payment first : check your plugin\'s parameters,
			on your website backend', 'error');
            return false;
        }
        if (empty($this->payment_params->sellerSecret)) {
            $this->app->enqueueMessage('You have to configure the seller Secret for the googlewallet plugin payment first : check your plugin\'s parameters,
			on your website backend', 'error');
            return false;
        }
        $amount = round($order->cart->full_total->prices[0]->price_value_with_tax, 2);
        $succes_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=' . $order->order_id . $this->url_itemid;
        $cancel_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=' . $order->order_id . $this->url_itemid;
        $this->payment_params->succes_url = $succes_url;
        $this->payment_params->cancel_url = $cancel_url;
        $vars = array('iss' => trim($this->payment_params->sellerIdentifier), 'aud' => "Google", 'typ' => "google/payments/inapp/item/v1", 'exp' => time() + 3600, 'iat' => time(), 'request' => array('name' => $order->order_number, 'description' => "", 'price' => $amount, 'currencyCode' => $this->currency->currency_code, 'sellerData' => $order->order_id));
        $sellerSecret = $this->payment_params->sellerSecret;
        $token = JWT::encode($vars, $sellerSecret);
        $this->token = $token;
        $this->showPage('end');
        if ($this->payment_params->debug) {
            $this->writeToLog("Data send to googlewallet: \n\n\n" . print_r($vars, true));
        }
    }
开发者ID:q0821,项目名称:esportshop,代码行数:32,代码来源:googlewallet.php

示例3: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     $httpsHikashop = HIKASHOP_LIVE;
     //str_replace('http://','https://', HIKASHOP_LIVE);
     $notify_url = $httpsHikashop . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=cmcic&tmpl=component&orderId=' . $order->order_id . '&lang=' . $this->locale;
     $return_url = $httpsHikashop . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=cmcic&tmpl=component&cmcic_return=1&orderId=' . $order->order_id . '&lang=' . $this->locale;
     $localeCM = 'FR';
     if (in_array($this->locale, array('fr', 'en', 'de', 'it', 'es', 'nl', 'pt'))) {
         $localCM = strtoupper($this->locale);
     }
     if (@$this->payment_params->sandbox) {
         $urls = array('cm' => 'https://paiement.creditmutuel.fr/test/paiement.cgi', 'cic' => 'https://ssl.paiement.cic-banques.fr/test/paiement.cgi', 'obc' => 'https://ssl.paiement.banque-obc.fr/test/paiement.cgi');
     } else {
         $urls = array('cm' => 'https://paiement.creditmutuel.fr/paiement.cgi', 'cic' => 'https://ssl.paiement.cic-banques.fr/paiement.cgi', 'obc' => 'https://ssl.paiement.banque-obc.fr/paiement.cgi');
     }
     if (!isset($this->payment_params->bank) || !isset($urls[$this->payment_params->bank])) {
         $this->payment_params->bank = 'cm';
     }
     $this->url = $urls[$this->payment_params->bank];
     $this->vars = array('TPE' => trim($this->payment_params->tpe), 'date' => date('d/m/Y:H:i:s'), 'montant' => number_format($order->cart->full_total->prices[0]->price_value_with_tax, 2, '.', '') . $this->currency->currency_code, 'reference' => $order->order_number, 'texte-libre' => '', 'version' => '3.0', 'lgue' => $localeCM, 'societe' => trim($this->payment_params->societe), 'mail' => $this->user->user_email);
     $this->vars['MAC'] = $this->generateHash($this->vars, $this->payment_params->key, 19);
     if (@$this->payment_params->debug) {
         echo 'Data sent<pre>' . var_export($this->vars, true) . '</pre>';
     }
     $this->vars['url_retour'] = HIKASHOP_LIVE . 'index.php?option=com_hikashop';
     $this->vars['url_retour_ok'] = $return_url;
     $this->vars['url_retour_err'] = $return_url;
     $this->showPage('end');
     return true;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:31,代码来源:cmcic.php

示例4: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     if ($this->payment_params->testingMode == true) {
         $this->payment_params->url = "https://sandbox.payfast.co.za/eng/process";
     } else {
         $this->payment_params->url = "https://www.payfast.co.za/eng/process";
     }
     if (empty($this->payment_params->merchant_id)) {
         $this->app->enqueueMessage('You have to configure an merchant id for the payfast plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     }
     if (empty($this->payment_params->merchant_key)) {
         $this->app->enqueueMessage('You have to configure the merchant key for the payfast plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     }
     $amount = round($order->cart->full_total->prices[0]->price_value_with_tax, 2);
     $notify_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=' . $this->name . '&tmpl=component&lang=' . $this->locale . $this->url_itemid;
     $return_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=' . $order->order_id . $this->url_itemid;
     $cancel_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=' . $order->order_id . $this->url_itemid;
     $vars = array('merchant_id' => trim($this->payment_params->merchant_id), 'merchant_key' => trim($this->payment_params->merchant_key), 'return_url' => $return_url, 'cancel_url' => $cancel_url, 'notify_url' => $notify_url, 'name_first' => substr(@$order->cart->billing_address->address_firstname, 0, 99), 'name_last' => substr(@$order->cart->billing_address->address_lastname, 0, 99), 'email_address' => substr($this->user->user_email, 0, 99), 'm_payment_id' => (int) $order->order_id, 'amount' => $amount, 'item_name' => $order->order_number);
     $this->vars = $vars;
     $pfOutput = array();
     foreach ($vars as $key => $val) {
         if (!empty($val)) {
             $pfOutput[] = $key . '=' . urlencode(trim($val));
         }
     }
     $getString = implode('&', $pfOutput);
     $vars['signature'] = md5($getString);
     if ($this->payment_params->debug) {
         $this->writeToLog("Data sent to PayFast: \n\n" . print_r($vars, true));
     }
     return $this->showPage('end');
 }
开发者ID:q0821,项目名称:esportshop,代码行数:35,代码来源:payfast.php

示例5: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     // This is a mandatory line in order to initialize the attributes of the payment method
     //Here we can do some checks on the options of the payment method and make sure that every required parameter is set and otherwise display an error message to the user
     if (empty($this->payment_params->identifier)) {
         $this->app->enqueueMessage('You have to configure an identifier for the Mpesa plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         //Enqueued messages will appear to the user, as Joomla's error messages
         return false;
     } elseif (empty($this->payment_params->password)) {
         $this->app->enqueueMessage('You have to configure a password for the Mpesa plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     } elseif (empty($this->payment_params->payment_url)) {
         $this->app->enqueueMessage('You have to configure a payment url for the Mpesa plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     } else {
         //Here, all the required parameters are valid, so we can proceed to the payment platform
         $amout = round($order->cart->full_total->prices[0]->price_value_with_tax, 2) * 100;
         //The order's amount, here in cents and rounded with 2 decimals because of the payment plateform's requirements
         //There is a lot of information in the $order variable, such as price with/without taxes, customer info, products... you can do a var_dump here if you need to display all the available information
         //This array contains all the required parameters by the payment plateform
         //Not all the payment platforms will need all these parameters and they will probably have a different name.
         //You need to look at the payment gateway integration guide provided by the payment gateway in order to know what is needed here
         $vars = array('IDENTIFIER' => $this->payment_params->identifier, 'CLIENTIDENT' => $order->order_user_id, 'DESCRIPTION' => "order number : " . $order->order_number, 'ORDERID' => $order->order_id, 'VERSION' => 2.0, 'AMOUNT' => $amout);
         $vars['HASH'] = $this->mpesa_signature($this->payment_params->password, $vars);
         //Hash generated to certify the values integrity
         //This hash is generated according to the plateform requirements
         $this->vars = $vars;
         //Ending the checkout, ready to be redirect to the plateform payment final form
         //The showPage function will call the mpesa_end.php file which will display the redirection form containing all the parameters for the payment platform
         return $this->showPage('end');
     }
 }
开发者ID:patricmutwiri,项目名称:lipa-na-mpesa,代码行数:33,代码来源:mpesa.php

示例6: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     $address = $this->app->getUserState(HIKASHOP_COMPONENT . '.billing_address');
     if (!empty($address)) {
         $firstname = @$order->cart->billing_address->address_firstname;
         $lastname = @$order->cart->billing_address->address_lastname;
         $address1 = '';
         if (!empty($order->cart->billing_address->address_street)) {
             $address1 = substr($order->cart->billing_address->address_street, 0, 200);
         }
         $zip = @$order->cart->billing_address->address_post_code;
         $city = @$order->cart->billing_address->address_city;
         $state = @$order->cart->billing_address->address_state->zone_code_3;
         $country = @$order->cart->billing_address->address_country->zone_code_2;
         $email = $this->user->user_email;
         $phone = @$order->cart->billing_address->address_telephone;
     }
     $notify_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=alipay&tmpl=component&lang=' . $this->locale . $this->url_itemid;
     $return_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=' . $order->order_id . $this->url_itemid;
     $out_trade_no = $order->order_id;
     if ($this->payment_params->Mode == "Partner") {
         $order_params = array("seller_email" => $this->payment_params->email, "service" => "create_partner_trade_by_buyer", "partner" => $this->payment_params->partner_id, "return_url" => $return_url, "notify_url" => $notify_url, "_input_charset" => "utf-8", "subject" => 'order number : ' . $out_trade_no, "body" => '', "out_trade_no" => $out_trade_no, "payment_type" => "1", "price" => round($order->order_full_price, (int) $this->currency->currency_locale['int_frac_digits']), "quantity" => "1", "logistics_type" => "EXPRESS", "logistics_fee" => "0.00", "logistics_payment" => "BUYER_PAY", 'receive_name' => $lastname . ' ' . $firstname, 'receive_address' => $address1, 'receive_zip' => $zip, 'receive_phone' => $phone);
     } else {
         $order_params = array("seller_email" => $this->payment_params->email, "service" => "create_direct_pay_by_user", "partner" => $this->payment_params->partner_id, "return_url" => $return_url, "notify_url" => $notify_url, "_input_charset" => "utf-8", "subject" => 'order number : ' . $out_trade_no, "body" => '', "out_trade_no" => $out_trade_no, "payment_type" => "1", "total_fee" => round($order->order_full_price, (int) $this->currency->currency_locale['int_frac_digits']));
     }
     $alipay = new alipay();
     $alipay->set_order_params($order_params);
     $alipay->set_transport($this->payment_params->transport);
     $alipay->set_security_code($this->payment_params->security_code);
     $alipay->set_sign_type($this->payment_params->sign_type);
     $sign = $alipay->_sign($alipay->_order_params);
     $this->payment_params->url = $alipay->create_payment_link();
     return $this->showPage('end');
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:35,代码来源:alipay.php

示例7: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     if (empty($this->payment_params->sessionvalidity)) {
         $this->payment_params->sessionvalidity = 1;
     }
     if (empty($this->payment_params->merchantaccount)) {
         $this->app->enqueueMessage('You have to configure a merchant account for the adyen plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     }
     if (empty($this->payment_params->skincode)) {
         $this->app->enqueueMessage('You have to configure the Skin Code for the adyen plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     } elseif (empty($this->payment_params->hmacKey)) {
         $this->app->enqueueMessage('You have to configure the Hmac Key for the adyen plugin payment first : check your plugin\'s parameters, on your website backend', 'error');
         return false;
     }
     $amount = round($order->cart->full_total->prices[0]->price_value_with_tax, 2) * 100;
     list($shipping_house, $shipping_street) = $this->splitStreet($order->cart->shipping_address->address_street);
     list($billing_house, $billing_street) = $this->splitStreet($order->cart->billing_address->address_street);
     $resURL = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=adyen&tmpl=component' . $this->url_itemid;
     $vars = array('merchantReference' => $order->order_id, 'paymentAmount' => $amount, 'currencyCode' => $this->currency->currency_code, 'shipBeforeDate' => date('Y-m-d', strtotime('+3 days')), 'skinCode' => trim($this->payment_params->skincode), 'merchantAccount' => trim($this->payment_params->merchantaccount), 'sessionValidity' => date('c', strtotime('+' . (int) $this->payment_params->sessionvalidity . ' days')), 'shopperLocale' => trim($this->payment_params->language_code), 'shopperEmail' => $this->user->user_email, 'shopperReference' => $this->user->user_id, 'resURL' => $resURL, 'allowedMethods' => preg_replace('#[^a-z0-9_\\-,]#i', '', $this->payment_params->allowedmethods), 'blockedMethods' => preg_replace('#[^a-z0-9_\\-,]#i', '', $this->payment_params->blockedmethods), 'billingAddress.street' => $billing_street, 'billingAddress.houseNumberOrName' => $billing_house, 'billingAddress.city' => $order->cart->billing_address->address_city, 'billingAddress.stateOrProvince' => $order->cart->billing_address->address_state->zone_name, 'billingAddress.country' => $order->cart->billing_address->address_country->zone_code_2, 'billingAddress.postalCode' => @$order->cart->billing_address->address_post_code, 'deliveryAddress.street' => $shipping_street, 'deliveryAddress.houseNumberOrName' => $shipping_house, 'deliveryAddress.city' => $order->cart->shipping_address->address_city, 'deliveryAddress.postalCode' => @$order->cart->shipping_address->address_post_code, 'deliveryAddress.stateOrProvince' => @$order->cart->shipping_address->address_state->zone_name, 'deliveryAddress.country' => $order->cart->shipping_address->address_country->zone_code_2, 'shopper.firstName' => @$order->cart->billing_address->address_firstname, 'shopper.lastName' => @$order->cart->billing_address->address_lastname, 'shopper.telephoneNumber' => @$order->cart->billing_address->address_telephone);
     $vars['merchantSig'] = base64_encode(pack('H*', hash_hmac('sha1', $vars['paymentAmount'] . $vars['currencyCode'] . $vars['shipBeforeDate'] . $vars['merchantReference'] . $vars['skinCode'] . $vars['merchantAccount'] . $vars['sessionValidity'] . $vars['shopperEmail'] . $vars['shopperReference'] . $vars['allowedMethods'] . $vars['blockedMethods'], trim($this->payment_params->hmacKey))));
     $vars['billingAddressSig'] = base64_encode(pack('H*', hash_hmac('sha1', $vars['billingAddress.street'] . $vars['billingAddress.houseNumberOrName'] . $vars['billingAddress.city'] . $vars['billingAddress.postalCode'] . $vars['billingAddress.stateOrProvince'] . $vars['billingAddress.country'], trim($this->payment_params->hmacKey))));
     $vars['deliveryAddressSig'] = base64_encode(pack('H*', hash_hmac('sha1', $vars['deliveryAddress.street'] . $vars['deliveryAddress.houseNumberOrName'] . $vars['deliveryAddress.city'] . $vars['deliveryAddress.postalCode'] . $vars['deliveryAddress.stateOrProvince'] . $vars['deliveryAddress.country'], trim($this->payment_params->hmacKey))));
     $vars['shopperSig'] = base64_encode(pack('H*', hash_hmac('sha1', $vars['shopper.firstName'] . $vars['shopper.lastName'] . $vars['shopper.telephoneNumber'], trim($this->payment_params->hmacKey))));
     $this->vars = $vars;
     return $this->showPage('end');
 }
开发者ID:q0821,项目名称:esportshop,代码行数:29,代码来源:adyen.php

示例8: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     //Order Header values
     $totalAmount = round($order->order_full_price, (int) $this->currency->currency_locale['int_frac_digits']);
     $orderId = $order->order_id;
     //Option values
     $paymentSuccessfulURL = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=netgiro&lang=' . $this->locale . $this->url_itemid;
     $cancelUrl = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=' . $orderId . $this->url_itemid;
     $applicationId = $this->payment_params->application_id;
     $secretKey = $this->payment_params->secret_key;
     $maxInstallments = $this->payment_params->max_installments;
     $returnCustomerInfo = 'false';
     /*showP1 = show pay later option (14 days delay in payment)
      *showP2 = show partial payments
      *showP3 = show partial payments without interest
      */
     $paymentOptions = new paymentOptionsCls();
     $paymentOptions->showP1 = $this->payment_params->payment_opt1;
     $paymentOptions->showP2 = $this->payment_params->payment_opt2;
     $paymentOptions->showP3 = $this->payment_params->payment_opt3;
     //Signature - Signature for the message, calculated as SHA256(SecretKey + OrderId + TotalAmount + ApplicationId)
     $signature = hash('sha256', $secretKey . $orderId . $totalAmount . $applicationId);
     switch ($this->payment_params->mode) {
         case 'LIVE':
             $netGiropaymentUrl = 'https://www.netgiro.is/SecurePay';
             break;
         case 'TEST':
             $netGiropaymentUrl = 'http://test.netgiro.is/user/securepay';
             break;
         default:
             $netGiropaymentUrl = 'http://test.netgiro.is/user/securepay';
             break;
     }
     // Values that will be posted to Netgiro
     $vars = array('ApplicationID' => $applicationId, 'Signature' => $signature, 'PaymentSuccessfulURL' => $paymentSuccessfulURL, 'PaymentCancelledURL' => $cancelUrl, 'ReturnCustomerInfo' => 'false', 'Iframe' => 'false', 'OrderId' => $orderId, 'TotalAmount' => $totalAmount, 'MaxNumberOfInstallments' => $maxInstallments);
     //Order Item values
     $n = 0;
     foreach ($order->cart->products as $product) {
         $productPrice = round($product->order_product_price, (int) $this->currency->currency_locale['int_frac_digits']);
         $tax = round($product->order_product_tax, (int) $this->currency->currency_locale['int_frac_digits']);
         $unitPrice = $productPrice + $tax;
         $productAmount = round($product->order_product_total_price, (int) $this->currency->currency_locale['int_frac_digits']);
         //Quantity should be passed in 1/1000 units. For example if the quantity is 2 then it should be represented as 2000
         $quantity = $product->order_product_quantity * 1000;
         $vars["Items[{$n}].ProductNo"] = $product->order_product_code;
         $vars["Items[{$n}].Name"] = $product->order_product_name;
         $vars["Items[{$n}].UnitPrice"] = $unitPrice;
         $vars["Items[{$n}].Quantity"] = $quantity;
         $vars["Items[{$n}].Amount"] = $productAmount;
         $n++;
     }
     $this->vars = $vars;
     $this->netGiropaymentUrl = $netGiropaymentUrl;
     $this->paymentOptions = $paymentOptions;
     $this->appId = $applicationId;
     //call the netgiro_end.php
     return $this->showPage('end');
 }
开发者ID:HikaShop,项目名称:hikashoppayment-netgiro,代码行数:59,代码来源:netgiro.php

示例9: onAfterOrderConfirm

    function onAfterOrderConfirm(&$order, &$methods, $method_id)
    {
        parent::onAfterOrderConfirm($order, $methods, $method_id);
        // echo HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment='.$this->name;
        // die;
        $amount = $order->cart->full_total->prices[0]->price_value_with_tax;
        $url = JURI::root() . 'plugins/hikashoppayment/ubrir/catcher.php?id=' . $order->order_number;
        $readyToPay = false;
        // возможность платежа
        $bankHandler = new Ubrir(array('shopId' => $this->payment_params->twpg_id, 'order_id' => $order->order_number, 'sert' => $this->payment_params->twpg_private_pass, 'amount' => $amount, 'approve_url' => $url, 'cancel_url' => $url, 'decline_url' => $url));
        $response_order = $bankHandler->prepare_to_pay();
        // что вернул банк
        if (!empty($response_order)) {
            $db = JFactory::getDBO();
            $sql = " INSERT INTO #__twpg_orders  \n\t\t\t(`shoporderid`, `OrderID`, `SessionID`) \n\t\t\tVALUES  \n\t\t\t('" . $order->order_number . "', '" . $response_order->OrderID[0] . "', '" . $response_order->SessionID[0] . "') ";
            $db->setQuery($sql);
            if (!$db->query()) {
                exit('error_1101');
            }
        } else {
            switch ($response_order) {
                case 30:
                    echo 'Неверный формат сообщения';
                    break;
                case 10:
                    echo 'ИМ не имеет доступа к этой операции';
                    break;
                case 54:
                case 96:
                    echo 'недопустимая операция';
                    break;
            }
            exit;
        }
        $twpg_url = $response_order->URL[0] . '?orderid=' . $response_order->OrderID[0] . '&sessionid=' . $response_order->SessionID[0];
        echo '<p>Данный заказ необходимо оплатить одним из методов, приведенных ниже: </p> <INPUT TYPE="button" value="Оплатить Visa" onclick="document.location = \'' . $twpg_url . '\'">';
        if ($this->payment_params->two == 1) {
            $id = trim($this->payment_params->uniteller_id);
            $login = trim($this->payment_params->uniteller_login);
            $pass = trim($this->payment_params->uniteller_pass);
            $orderid = $order->order_number;
            $amount = round($amount, 2);
            $sign = strtoupper(md5(md5($id) . '&' . md5($login) . '&' . md5($pass) . '&' . md5($orderid) . '&' . md5($amount)));
            echo '<form action="https://91.208.121.201/estore_listener.php" name="uniteller" method="post" hidden>
			  <input type="number" name="SHOP_ID" value="' . $id . '">
			  <input type="text" name="LOGIN" value="' . $login . '">
			  <input type="text" name="ORDER_ID" value="' . $orderid . '">
			  <input type="number" name="PAY_SUM" value="' . $amount . '">
			  <input type="text" name="VALUE_1" value="' . $orderid . '">
			  <input type="text" name="URL_OK" value="' . JURI::root() . 'plugins/hikashoppayment/ubrir/catcher.php?status=ok&">
			  <input type="text" name="URL_NO" value="' . JURI::root() . 'plugins/hikashoppayment/ubrir/catcher.php?status=no&">
			  <input type="text" name="SIGN" value="' . $sign . '">
			  <input type="text" name="LANG" value="RU">
			</form>';
            // die;
            echo '<INPUT TYPE="button" value="Оплатить MasterCard" onclick="document.forms.uniteller.submit()">';
        }
    }
开发者ID:itm-constantine,项目名称:ubrr_hikashop,代码行数:58,代码来源:ubrir.php

示例10: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     $this->methods = $methods;
     $this->method_id = $method_id;
     $this->amount_total = round($order->cart->full_total->prices[0]->price_value_with_tax, 2) * 100;
     $this->id_pedido = $order->order_id;
     return $this->showPage('end');
 }
开发者ID:q0821,项目名称:esportshop,代码行数:9,代码来源:servired.php

示例11: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     if (empty($this->payment_params)) {
         return false;
     }
     $this->vars = $this->getVars($order);
     return $this->showPage('end');
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:9,代码来源:epay.php

示例12: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     $plugin = $this->loadCurrentPlugin($order->order_payment_id, $this->payment_params->common_payment_plugin);
     if (!is_object($plugin) || !method_exists($plugin, 'onTP_GetHTML')) {
         return '';
     }
     echo $plugin->onTP_GetHTML($this->_loadVars($order));
 }
开发者ID:q0821,项目名称:esportshop,代码行数:9,代码来源:common.php

示例13: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     if (!$this->init()) {
         return false;
     }
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     $this->notifyurl = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=' . $this->name . '&tmpl=component&orderid=' . $order->order_id;
     $this->order =& $order;
     return $this->showPage('end');
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:10,代码来源:stripe.php

示例14: onAfterOrderConfirm

 function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     if ($order->order_status != $this->payment_params->order_status) {
         $this->modifyOrder($order->order_id, $this->payment_params->order_status, (bool) @$this->payment_params->status_notif_email, false);
     }
     $this->removeCart = true;
     $currencyClass = hikashop_get('class.currency');
     $this->amount = $currencyClass->format($order->order_full_price, $order->order_currency_id);
     $this->order_number = $order->order_number;
     $this->showPage('end');
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:12,代码来源:collectondelivery.php

示例15: onBeforeOrderCreate

 function onBeforeOrderCreate(&$order, &$do)
 {
     if (parent::onBeforeOrderCreate($order, $do) === true) {
         return true;
     }
     if ($order->order_payment_method == 'purchaseorder') {
         $history = new stdClass();
         $history->type = 'purchase order';
         $history->notified = 0;
         $history->data = JText::_('PURCHASE_ORDER_NUMBER') . @$_SESSION['hikashop_purchase_order_number'];
         $this->modifyOrder($order, $this->payment_params->order_status, $history, false);
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:13,代码来源:purchaseorder.php


注:本文中的hikashopPaymentPlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。