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


PHP Json::GetValue方法代码示例

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


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

示例1: foreach

             print "ProductName      = [" . $detail->GetValue("ProductName") . "],";
             print "UnitPrice      = [" . $detail->GetValue("UnitPrice") . "],";
             print "Qty      = [" . $detail->GetValue("Qty") . "],";
             print "ProductRemarks      = [" . $detail->GetValue("ProductRemarks") . "],";
             print "<br/>";
         }
     }
     //获取分账账户信息
     $orderItems = $detail->GetArrayValue("Distribution");
     if (count($orderItems, COUNT_NORMAL) === 0) {
         print "分账账户信息明细为空<br/>";
     } else {
         foreach ($orderItems as $orderItem) {
             $detail = new Json($orderItems);
             print "分账账户信息明细为:<br/>";
             print "DisAccountNo      = [" . $detail->GetValue("DisAccountNo") . "],";
             print "DisAccountName      = [" . $detail->GetValue("DisAccountName") . "],";
             print "DisAmount      = [" . $detail->GetValue("DisAmount") . "],";
             print "<br/>";
         }
     }
 } else {
     if (payTypeID . equals("PreAuthed") || payTypeID . equals("PreAuthCancel")) {
         print "PayTypeID      = [" . $detail->GetValue("PayTypeID") . "]<br/>";
         print "OrderNo      = [" . $detail->GetValue("OrderNo") . "]<br/>";
         print "OrderDate      = [" . $detail->GetValue("OrderDate") . "]<br/>";
         print "OrderTime      = [" . $detail->GetValue("OrderTime") . "]<br/>";
         print "OrderAmount      = [" . $detail->GetValue("OrderAmount") . "]<br/>";
         print "Status      = [" . $detail->GetValue("Status") . "]<br/>";
         print "AcctNo      = [" . $detail->GetValue("AcctNo") . "]<br/>";
         print "iRspRef      = [" . $detail->GetValue("iRspRef") . "]<br/>";
开发者ID:pqshawn,项目名称:sparrowPHP,代码行数:31,代码来源:MerchantQueryOrder.php

示例2: foreach

    print "BatchTime    = [" . $tResponse->GetValue("BatchTime") . "]<br/>";
    print "AgentAmount  = [" . $tResponse->GetValue("AgentAmount") . "]<br/>";
    print "AgentCount    = [" . $tResponse->GetValue("AgentCount") . "]<br/>";
    print "BatchStatus    = [" . $tResponse->GetValue("BatchStatus") . "]<br/>";
    print "BatchStatusZH    = [" . $tRequest->getBatchSatusChinese($tResponse->GetValue("BatchStatus")) . "]<br/>";
    print "CurrencyCode    = [" . $tResponse->GetValue("CurrencyCode") . "]<br/>";
    print "SuccessAmount    = [" . $tResponse->GetValue("SuccessAmount") . "]<br/>";
    print "SuccessCount    = [" . $tResponse->GetValue("SuccessCount") . "]<br/>";
    print "FailedAmount    = [" . $tResponse->GetValue("FailedAmount") . "]<br/>";
    print "FailedCount    = [" . $tResponse->GetValue("FailedCount") . "]<br/>";
    //4、取得批量授权扣款明细
    $batchdetails = $tResponse->GetArrayValue("AgentBatchDetail");
    if (count($batchdetails, COUNT_NORMAL) === 0) {
        print "批量授权扣款明细为空<br/>";
    } else {
        foreach ($batchdetails as $batchdetail) {
            $detail = new Json($batchdetail);
            print "SeqNo   = [" . $detail->GetValue("SeqNo") . "],";
            print "OrderNo   = [" . $detail->GetValue("OrderNo") . "],";
            print "AcctNo   = [" . $detail->GetValue("AcctNo") . "],";
            print "OrderAmount = [" . $detail->GetValue("OrderAmount") . "],";
            print "AgentSignNo = [" . $detail->GetValue("AgentSignNo") . "],";
            print "OrderStatus  = [" . $detail->GetValue("OrderStatus") . "],";
            print "OrderStatusZH  = [" . tRequest . getBatchDetailStatusChinese($detail->GetValue("OrderStatus")) . "]<br/>";
        }
    }
} else {
    print "<br>Failed!!!" . "</br>";
    print "ReturnCode   = [" . $tResponse->getReturnCode() . "]</br>";
    print "ReturnMsg   = [" . $tResponse->getErrorMessage() . "]</br>";
}
开发者ID:pqshawn,项目名称:sparrowPHP,代码行数:31,代码来源:AgentBatchPaymentQuery.php


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