public static IPayD XpayToPayDAdapter(IXPay ixp) { IPayD ip = new PayDImpl(); ip.CustCardNo = ixp.CreditCardNo; ip.CvvNo = ixp.CardCvvNo; ip.CardOwnerName = ixp.CustomerName; ip.CardExpMonthDate = ixp.CardExpMonth; ip.TotalAmount = (decimal)ixp.Amount; return(ip); }
public static IPayD XpayToPayDAdapter(IXPay ixp) { var adapter = new XpayToPayD(); adapter.CustCardNo = ixp.CreditCardNo; adapter.CardOwnerName = ixp.CustomerName; adapter.CardExpMonthDate = ixp.CardExpMonth; adapter.CvvNo = ixp.CardCvvNo; adapter.TotalAmount = (decimal)ixp.Amount; return(adapter); }
public XPay() { if (Device.RuntimePlatform != Device.iOS && Device.RuntimePlatform != Device.Android) { throw new NotSupportedException(); } this.PaymentPlatform = DependencyService.Get <IXPay>(DependencyFetchTarget.NewInstance); if (this.PaymentPlatform == null) { throw new NotImplementedException(); } this.PaymentPlatform.AuthorizePayment += PaymentPlatform_AuthorizePayment; this.PaymentPlatform.DidFinish += PaymentPlatform_DidFinish; }