<?php // 產生托運單(宅配)/一段標(超商取貨) require 'AllPay.Logistics.Integration.php'; try { $AL = new AllpayLogistics(); $AL->HashKey = '5294y06JbISpM5x9'; $AL->HashIV = 'v77hoKGq4kWxNNIS'; $AL->Send = array('MerchantID' => '2000132', 'AllPayLogisticsID' => '14559', 'PlatformID' => ''); // PrintTradeDoc(Button名稱, Form target) $html = $AL->PrintTradeDoc('產生托運單/一段標'); echo $html; } catch (Exception $e) { echo $e->getMessage(); }
<?php // 產生托運單(宅配)/一段標(超商取貨) require '../lib/AllPay.Logistics.Integration.php'; try { $AL = new AllpayLogistics(); $AL->HashKey = '5294y06JbISpM5x9'; $AL->HashIV = 'v77hoKGq4kWxNNIS'; $AL->Send = array('MerchantID' => '2000132', 'AllPayLogisticsID' => '11807', 'PlatformID' => ''); $Result = $AL->PrintTradeDoc('產生托運單/一段標'); echo $Result; } catch (Exception $e) { echo $e->getMessage(); }
} assert_internal_type("array", gettype($sTest_Result), $sTest_Subject); unset($sHome_URL, $oA_L, $sTest_Subject, $sTest_Result); /** * 產生托運單(宅配)/一段標(超商取貨)(PrintTradeDoc) */ $sTest_Subject = "allPay 產生托運單(宅配)/一段標(超商取貨)(PrintTradeDoc)"; $sTest_Result = ""; $sHome_URL = "http://www.sample.com.tw"; try { $oA_L = new AllpayLogistics(); $oA_L->HashKey = TestMerchantInfo::HASH_KEY; $oA_L->HashIV = TestMerchantInfo::HASH_IV; $oA_L->Send = array("MerchantID" => TestMerchantInfo::MERCHANT_ID, "AllPayLogisticsID" => "14559", "PlatformID" => ""); // PrintTradeDoc(Button 名稱, Form target) $sTest_Result = $oA_L->PrintTradeDoc("產生托運單/一段標"); } 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); /** * 列印統一繳款單(統一超商 C2C)(PrintUnimartC2CBill) */ $sTest_Subject = "allPay 列印統一繳款單(統一超商 C2C)(PrintUnimartC2CBill)"; $sTest_Result = ""; $sHome_URL = "http://www.sample.com.tw"; try { $oA_L = new AllpayLogistics(); $oA_L->HashKey = TestC2CMerchantInfo::HASH_KEY;