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


PHP Lib::array2xml方法代码示例

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


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

示例1: array

     $paymentModel->attempt++;
     $paymentModel->save();
     $saveOrderModel->status = 'error';
     $saveOrderModel->save(false);
     continue;
 }
 $xmlArray = array('request' => array('action' => '', 'meta' => array('merchantid' => '7760', 'ipaddress' => $_SERVER['SERVER_ADDR'], 'version' => '2.0')));
 $ExternalData = new ExternalData();
 $xmlArray['request']['action'] = 'INSERT_ORDERWITHPAYMENT';
 $payment = array('paymentproductid' => $paymentMethod, 'amount' => $amount * 100, 'currencycode' => $paymentModel->currency, 'countrycode' => strtoupper($orderModel->country_id), 'languagecode' => $r1['lang_id'], 'returnurl' => $gcOptions['returnUrl'], 'PROFILETOKEN' => $PROFILETOKEN, 'MANDATE' => 'PRESENT');
 foreach ($gcPaymentArray as $key => $value) {
     $payment[$key] = $value;
 }
 $params = array('order' => array('orderid' => $orderModel->order_id, 'amount' => $amount * 100, 'currencycode' => $paymentModel->currency, 'ipaddresscustomer' => $_SERVER['REMOTE_ADDR'], 'countrycode' => strtoupper($orderModel->country_id), 'languagecode' => $r1['lang_id'], 'merchantreference' => 'P' . $orderModel->order_id, 'firstname' => $orderModel->fname, 'surname' => $orderModel->lname, 'street' => $orderModel->address1, 'city' => $orderModel->city, 'zip' => $orderModel->zip, 'state' => $r1['state_name'] ? $r1['state_name'] : $orderModel->state_id, 'email' => $orderModel->email, 'descriptor' => $mainProduct->product_name, 'MANDATE' => 'PRESENT'), 'payment' => $payment);
 $xmlArray['request']['params'] = $params;
 $xml = Lib::array2xml($xmlArray);
 $answer = $ExternalData->getData($gcOptions['curlUrl'], $xml);
 $answerXml = simplexml_load_string($answer);
 if (false) {
     header("Content-type:text/xml; charset=utf-8");
     echo $answer;
     die;
 }
 if ($RESPONSE->RESULT != 'OK') {
     $paymentModel->attempt++;
     $paymentModel->save();
     $saveOrderModel->status = 'error';
     $saveOrderModel->save(false);
     continue;
 }
 $STATUSID = $RESPONSE->STATUS->STATUSID;
开发者ID:,项目名称:,代码行数:31,代码来源:


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