|
環境 : IIS + Classic ASP
透過 MSXML2 POST 參數,取得 CheckMacValue
Set httpRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
httpRequest.Open " OST", "https://payment-stage.allPay.com.tw/AioHelper/GenCheckMacValue", False
httpRequest.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.SetRequestHeader "accept-charset","UTF-8"
GenCheckMacValue https://payment-stage.allPay.com.tw/AioHelper/GenCheckMacValue)
-------------------
HashKey=5294y06JbISpM5x9&ChoosePayment=ATM&ItemName=*漂亮小媽咪*魅力女人微透歐根紗修身甜美洋裝短袖孕婦裝孕婦連衣裙娃娃裝 EB3080&MerchantID=2000132&MerchantTradeDate=2016/08/14 12:24:41&MerchantTradeNo=NM2016072800001& aymentInfoURL=https://www.nicemami.com.tw/Allpay_payment.asp?Act=AllpaySrvPayInfo& aymentType=aio&ReturnURL=https://www.nicemami.com.tw/Allpay_payment.asp?Act=AllpaySrvReturn&TotalAmount=559&TradeDesc=(漂亮小媽咪 NiceMami)購物&HashIV=v77hoKGq4kWxNNIS&EncryptType=0
md5 from AllPay=CCA8585373745B97798ECFA7EB9A4298<hr>
------------------- 然後把 接到的 CheckMacValue 代入 FORM POST出去
<form action='https://payment-stage.allpay.com.tw/Cashier/AioCheckOut/V2' method=post accept-charset='UTF-8' >
ChoosePayment: <input type=text name='ChoosePayment' value='ATM' ><br>
ItemName: <input type=text name='ItemName' value='*漂亮小媽咪*魅力女人微透歐根紗修身甜美洋裝短袖孕婦裝孕婦連衣裙娃娃裝 EB3080' ><br>
MerchantID: <input type=text name='MerchantID' value='2000132' ><br>
MerchantTradeDate: <input type=text name='MerchantTradeDate' value='2016/08/14 12:24:41' ><br>
MerchantTradeNo: <input type=text name='MerchantTradeNo' value='NM2016072800001' ><br>
PaymentInfoURL: <input type=text name='PaymentInfoURL' value='https://www.nicemami.com.tw/Allpay_payment.asp?Act=AllpaySrvPayInfo' ><br>
PaymentType: <input type=text name='PaymentType' &nbs |
|