using System.Xml.Serialization;
|
|
using BWP.ABCClient.Common;
|
|
|
|
namespace BWP.ABCClient.B2C
|
|
{
|
|
[XmlRoot(ElementName = "MSG")]
|
|
public class PaymentRequest : MessageBase
|
|
{
|
|
public MessageContent Message { get; set; }
|
|
|
|
public static PaymentRequest New()
|
|
{
|
|
return new PaymentRequest {
|
|
Message = new MessageContent {
|
|
Merchant = new MerchantContent {
|
|
ECMerchantType = "B2C",
|
|
MerchantID = string.Empty
|
|
},
|
|
TrxRequest = new TrxRequestContent {
|
|
TrxType = TrxType.PayReq,
|
|
Order = new OrderContent {
|
|
OrderNo = string.Empty,
|
|
OrderAmount = string.Empty,
|
|
OrderDesc = string.Empty,
|
|
OrderDate = string.Empty,
|
|
OrderTime = string.Empty,
|
|
OrderURL = string.Empty,
|
|
PayAmount = null,
|
|
RefundAmount = null,
|
|
OrderStatus = null,
|
|
OrderItems = new OrderItem[]{}
|
|
},
|
|
ProductType = "2",
|
|
PaymentType = "1",
|
|
NotifyType = "1",
|
|
ResultNotifyURL = string.Empty,
|
|
MerchantRemarks = string.Empty,
|
|
PaymentLinkType = "1"
|
|
}
|
|
},
|
|
SignatureAlgorithm = "SHA1withRSA",
|
|
Signature = string.Empty
|
|
};
|
|
}
|
|
|
|
public class MessageContent
|
|
{
|
|
public MerchantContent Merchant { get; set; }
|
|
public TrxRequestContent TrxRequest { get; set; }
|
|
}
|
|
|
|
public class TrxRequestContent
|
|
{
|
|
public string TrxType { get; set; }
|
|
public OrderContent Order { get; set; }
|
|
public string ProductType { get; set; }
|
|
public string PaymentType { get; set; }
|
|
public string NotifyType { get; set; }
|
|
public string ResultNotifyURL { get; set; }
|
|
public string MerchantRemarks { get; set; }
|
|
public string PaymentLinkType { get; set; }
|
|
}
|
|
}
|
|
}
|