protected function _ConstructPostData($postData) { $currency = GetDefaultCurrency(); $currencycode = strtolower($currency['currencycode']); switch ($postData['cctype']) { case 'VISA': $cctype = '001'; break; case 'MC': $cctype = '002'; break; case 'AMEX': $cctype = '003'; break; case 'DISCOVER': $cctype = '004'; break; case 'DINERS': $cctype = '005'; break; default: $cctype = '000'; break; } $amount = $this->GetGatewayAmount(); $billingDetails = $this->GetBillingDetails(); $timestamp = getmicrotime(); $transactionid = $this->GetCombinedOrderId(); $signatureData = getMerchantID() . $amount . $currencycode . $timestamp . 'sale'; $cybersourcePost['merchantID'] = getMerchantID(); $cybersourcePost['billTo_firstName'] = htmlentities($billingDetails['ordbillfirstname']); $cybersourcePost['billTo_lastName'] = $billingDetails['ordbilllastname']; $cybersourcePost['billTo_street1'] = $billingDetails['ordbillstreet1']; $cybersourcePost['billTo_city'] = $billingDetails['ordbillsuburb']; $cybersourcePost['billTo_state'] = $billingDetails['ordbillstate']; $cybersourcePost['billTo_postalCode'] = $billingDetails['ordbillzip']; $cybersourcePost['billTo_country'] = $billingDetails['ordbillcountry']; $cybersourcePost['billTo_email'] = $billingDetails['ordbillemail']; $cybersourcePost['card_cardType'] = $cctype; $cybersourcePost['card_accountNumber'] = $postData['ccno']; $cybersourcePost['card_expirationMonth'] = $postData['ccexpm']; $cybersourcePost['card_expirationYear'] = '20' . $postData['ccexpy']; $cybersourcePost['orderPage_timestamp'] = $timestamp; $cybersourcePost['orderPage_signaturePublic'] = hopHash($signatureData, getPublicKey()); $cybersourcePost['orderPage_serialNumber'] = getSerialNumber(); $cybersourcePost['orderPage_version'] = '4'; $cybersourcePost['orderPage_transactionType'] = 'sale'; $cybersourcePost['amount'] = $amount; $cybersourcePost['currency'] = $currencycode; $cybersourcePost['hash'] = md5($this->GetValue("accessid") . $transactionid . $_COOKIE['SHOP_ORDER_TOKEN'] . $amount); $cybersourcePost['orderid'] = $transactionid; $cybersourcePost['iscsessionid'] = $_COOKIE['SHOP_ORDER_TOKEN']; return $cybersourcePost; }
<?php $merchant_id = getMerchantID(); $sms = Yii::app()->functions->getOption("sms_alert_change_status", $merchant_id); $order = Yii::app()->functions->getOrder2($this->data['order_id']); ?> <!--<link href="<?php echo assetsURL(); ?> /css/store.css?ver=1.0" rel="stylesheet" />--> <div class="pop-wrap" style="width:500px;padding:10px;"> <div class="modal-header"> <h3 class="left"><?php echo Yii::t("default", "Send SMS To Customer"); ?> </h3> <a class="right fc-close" href="javascript:;"><i class="fa fa-times"></i></a> <div class="clear"></div> </div> <form id="frm-modal-sendsms" class="frm-modal-sendsms" method="POST" onsubmit="return false;" > <?php echo CHtml::hiddenField('action', 'sendUpdateOrderSMS'); ?> <?php echo CHtml::hiddenField('order_id', $this->data['order_id']); ?> <div class="modal-body">
function InsertSignature($amount) { $merchantID = getMerchantID(); $timestamp = getmicrotime(); $data = $merchantID . $amount . $timestamp; $pub = getPublicKey(); $pvt = getPrivateKey(); $pub_digest = hopHash($data, $pub); $pvt_digest = hopHash($data, $pvt); echo '<input type="hidden" name="amount" value="' . $amount . '">' . "\n"; echo '<input type="hidden" name="orderPage_timestamp" value="' . $timestamp . '">' . "\n"; echo '<input type="hidden" name="merchantID" value="' . $merchantID . '">' . "\n"; echo '<input type="hidden" name="orderPage_signaturePublic" value="' . $pub_digest . '">' . "\n"; echo '<input type="hidden" name="orderPage_signaturePrivate" value="' . $pvt_digest . '">' . "\n"; }
function InsertSignature($amount, $currency) { if (!isset($amount)) { $amount = "0.00"; } if (!isset($currency)) { $currency = "usd"; } $merchantID = getMerchantID(); $timestamp = getmicrotime(); $data = $merchantID . $amount . $currency . $timestamp; $pub = getPublicKey(); $serialNumber = getSerialNumber(); $pub_digest = hopHash($data, $pub); echo '<input type="hidden" name="amount" value="' . $amount . '">' . "\n"; echo '<input type="hidden" name="currency" value="' . $currency . '">' . "\n"; echo '<input type="hidden" name="orderPage_timestamp" value="' . $timestamp . '">' . "\n"; echo '<input type="hidden" name="merchantID" value="' . $merchantID . '">' . "\n"; echo '<input type="hidden" name="orderPage_signaturePublic" value="' . $pub_digest . '">' . "\n"; echo '<input type="hidden" name="orderPage_version" value="4">' . "\n"; echo '<input type="hidden" name="orderPage_serialNumber" value="' . $serialNumber . '">' . "\n"; }