namespace com.hitrust.trustpay.client.b2c
|
|
{
|
|
using com.hitrust.trustpay.client;
|
|
using System;
|
|
|
|
public class VoidPaymentRequest : TrxRequest
|
|
{
|
|
private string iOrderNo;
|
|
|
|
public VoidPaymentRequest() : base("B2C")
|
|
{
|
|
this.iOrderNo = "";
|
|
}
|
|
|
|
protected internal override void checkRequest()
|
|
{
|
|
if (this.iOrderNo.Length == 0)
|
|
{
|
|
throw new TrxException("1100", "商户提交的交易资料不完整", "未设定订单号!");
|
|
}
|
|
if (SupportClass.ToSByteArray(SupportClass.ToByteArray(this.iOrderNo)).Length > 50)
|
|
{
|
|
throw new TrxException("1101", "商户提交的交易资料不合法", "订单号不合法!");
|
|
}
|
|
}
|
|
|
|
protected internal override TrxResponse constructResponse(XMLDocument aResponseMessage)
|
|
{
|
|
return new TrxResponse(aResponseMessage);
|
|
}
|
|
|
|
public virtual string OrderNo
|
|
{
|
|
get
|
|
{
|
|
return this.iOrderNo;
|
|
}
|
|
set
|
|
{
|
|
this.iOrderNo = value.Trim();
|
|
}
|
|
}
|
|
|
|
protected internal override XMLDocument RequestMessage
|
|
{
|
|
get
|
|
{
|
|
return new XMLDocument("<TrxRequest><TrxType>VoidPay</TrxType><OrderNo>" + this.iOrderNo + "</OrderNo></TrxRequest>");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|