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


PHP payment::sendInfo方法代码示例

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


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

示例1: requestMerchant

 function requestMerchant()
 {
     $payment = new payment();
     $datenow = date("d/m/Y h:m:s");
     $modifiedDate = str_replace(" ", "%20", $datenow);
     $payment->url = $this->paymentConfig->Url;
     $postFields = "";
     $postFields .= "&login=" . $this->paymentConfig->Login;
     $postFields .= "&pass=" . $this->paymentConfig->Password;
     $postFields .= "&ttype=" . $_POST['TType'];
     $postFields .= "&prodid=" . $_POST['product'];
     $postFields .= "&amt=" . $_POST['amount'];
     $postFields .= "&txncurr=" . $this->paymentConfig->TxnCurr;
     $postFields .= "&txnscamt=" . $this->paymentConfig->TxnScAmt;
     $postFields .= "&clientcode=" . urlencode(base64_encode($_POST['clientcode']));
     $postFields .= "&txnid=" . rand(0, 999999);
     $postFields .= "&date=" . $modifiedDate;
     $postFields .= "&custacc=" . $_POST['AccountNo'];
     $postFields .= "&ru=" . $_POST['ru'];
     $postFields .= "&udf1=" . str_replace(" ", "%20", $_POST['udf1']);
     $postFields .= "&udf2=" . $_POST['udf2'];
     $postFields .= "&udf3=" . $_POST['udf3'];
     $postFields .= "&udf4=" . str_replace(" ", "%20", $_POST['udf4']);
     // Not required for merchant
     //$postFields .= "&bankid=".$_POST['bankid'];
     $sendUrl = $payment->url . "?" . substr($postFields, 1) . "\n";
     $this->writeLog($sendUrl);
     $returnData = $payment->sendInfo($postFields);
     $this->writeLog($returnData . "\n");
     $xmlObjArray = $this->xmltoarray($returnData);
     $url = $xmlObjArray['url'];
     $postFields = "";
     $postFields .= "&ttype=" . $_POST['TType'];
     $postFields .= "&tempTxnId=" . $xmlObjArray['tempTxnId'];
     $postFields .= "&token=" . $xmlObjArray['token'];
     $postFields .= "&txnStage=1";
     $url = $payment->url . "?" . $postFields;
     $this->writeLog($url . "\n");
     header("Location: " . $url);
 }
开发者ID:exp-nazeem,项目名称:financial,代码行数:40,代码来源:submit.php


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