*/ $sTest_Subject = "ECPay 列印全家小白單(全家超商 C2C)(PrintFamilyC2CBill)"; $sTest_Result = ""; $sHome_URL = "http://www.sample.com.tw"; try { $oA_L = new ECPayLogistics(); $oA_L->HashKey = TestC2CMerchantInfo::HASH_KEY; $oA_L->HashIV = TestC2CMerchantInfo::HASH_IV; $oA_L->Send = array("MerchantID" => TestC2CMerchantInfo::MERCHANT_ID, "AllPayLogisticsID" => "11810", "CVSPaymentNo" => "05902347158", "PlatformID" => ""); // PrintFamilyC2CBill(Button 名稱, Form target) $sTest_Result = $oA_L->PrintFamilyC2CBill("列印全家小白單(全家超商 C2C)"); } catch (Exception $e) { $sTest_Result = $e->getMessage(); unset($e); } assert_have($sTest_Result, "ECPayForm", $sTest_Subject); unset($sHome_URL, $oA_L, $sTest_Subject, $sTest_Result); /** * CheckMacValue 驗證功能(CheckOutFeedback) */ $sTest_Subject = "ECPay CheckMacValue 驗證功能(CheckOutFeedback)"; $sTest_Result = ""; $sHome_URL = "http://www.sample.com.tw"; $aTest_POST = array("MerchantID" => TestMerchantInfo::MERCHANT_ID, "MerchantTradeNo" => "no20160816070914", "MerchantTradeDate" => "2016/08/16 07:09:14", "LogisticsType" => "Home", "LogisticsSubType" => "TCAT", "GoodsAmount" => "1500", "IsCollection" => "N", "GoodsName" => "測試商品", "SenderName" => "測試寄件者", "SenderPhone" => "0226550115", "SenderCellPhone" => "0911222333", "ReceiverName" => "測試收件者", "ReceiverPhone" => "0226550115", "ReceiverCellPhone" => "0933222111", "ReceiverEmail" => "*****@*****.**", "TradeDesc" => "測試交易敘述", "ServerReplyURL" => $sHome_URL . "/ServerReplyURL.php", "ClientReplyURL" => $sHome_URL . "/ClientReplyURL.php", "LogisticsC2CReplyURL" => $sHome_URL . "/LogisticsC2CReplyURL.php", "Remark" => "測試備註", "PlatformID" => "", "SenderZipCode" => "11560", "SenderAddress" => "台北市南港區三重路 19-2 號 10 樓 D 棟", "ReceiverZipCode" => "11560", "ReceiverAddress" => "台北市南港區三重路 19-2 號 5 樓 D 棟", "Temperature" => "0003", "Distance" => "01", "Specification" => "0004", "ScheduledDeliveryTime" => "3", "ScheduledPickupTime" => "4", "CheckMacValue" => "BE972990BFE7BE986E33EE4673D37A45"); try { $oA_L = new ECPayLogistics(); $oA_L->HashKey = TestMerchantInfo::HASH_KEY; $oA_L->HashIV = TestMerchantInfo::HASH_IV; // CheckOutFeedback(POST 參數) $oA_L->CheckOutFeedback($aTest_POST); } catch (Exception $e) {
*/ $sTest_Subject = "allPay 列印全家小白單(全家超商 C2C)(PrintFamilyC2CBill)"; $sTest_Result = ""; $sHome_URL = "http://www.sample.com.tw"; try { $oA_L = new AllpayLogistics(); $oA_L->HashKey = TestC2CMerchantInfo::HASH_KEY; $oA_L->HashIV = TestC2CMerchantInfo::HASH_IV; $oA_L->Send = array("MerchantID" => TestC2CMerchantInfo::MERCHANT_ID, "AllPayLogisticsID" => "11810", "CVSPaymentNo" => "05902347158", "PlatformID" => ""); // PrintFamilyC2CBill(Button 名稱, Form target) $sTest_Result = $oA_L->PrintFamilyC2CBill("列印全家小白單(全家超商 C2C)"); } catch (Exception $e) { $sTest_Result = $e->getMessage(); unset($e); } assert_have($sTest_Result, "allpayForm", $sTest_Subject); unset($sHome_URL, $oA_L, $sTest_Subject, $sTest_Result); /** * CheckMacValue 驗證功能(CheckOutFeedback) */ $sTest_Subject = "allPay CheckMacValue 驗證功能(CheckOutFeedback)"; $sTest_Result = ""; $sHome_URL = "http://www.sample.com.tw"; $aTest_POST = array("MerchantID" => TestMerchantInfo::MERCHANT_ID, "MerchantTradeNo" => "no20160816070914", "MerchantTradeDate" => "2016/08/16 07:09:14", "LogisticsType" => "Home", "LogisticsSubType" => "TCAT", "GoodsAmount" => "1500", "IsCollection" => "N", "GoodsName" => "測試商品", "SenderName" => "測試寄件者", "SenderPhone" => "0226550115", "SenderCellPhone" => "0911222333", "ReceiverName" => "測試收件者", "ReceiverPhone" => "0226550115", "ReceiverCellPhone" => "0933222111", "ReceiverEmail" => "*****@*****.**", "TradeDesc" => "測試交易敘述", "ServerReplyURL" => $sHome_URL . "/ServerReplyURL.php", "ClientReplyURL" => $sHome_URL . "/ClientReplyURL.php", "LogisticsC2CReplyURL" => $sHome_URL . "/LogisticsC2CReplyURL.php", "Remark" => "測試備註", "PlatformID" => "", "SenderZipCode" => "11560", "SenderAddress" => "台北市南港區三重路 19-2 號 10 樓 D 棟", "ReceiverZipCode" => "11560", "ReceiverAddress" => "台北市南港區三重路 19-2 號 5 樓 D 棟", "Temperature" => "0003", "Distance" => "01", "Specification" => "0004", "ScheduledDeliveryTime" => "3", "ScheduledPickupTime" => "4", "CheckMacValue" => "BE972990BFE7BE986E33EE4673D37A45"); try { $oA_L = new AllpayLogistics(); $oA_L->HashKey = TestMerchantInfo::HASH_KEY; $oA_L->HashIV = TestMerchantInfo::HASH_IV; // CheckOutFeedback(POST 參數) $oA_L->CheckOutFeedback($aTest_POST); } catch (Exception $e) {