/// <summary> /// Initializes a new instance of the <see cref="PaymentClient" /> class. /// </summary> /// <param name="config">The configuration.</param> public PaymentClient(TransactionInfo config) { switch (config.Type) { case TransactionType.AliWebPayment: this.Payment = new AliWebPayment(config); break; case TransactionType.AliMobilePayment: this.Payment = new AliMobilePayment(config); break; case TransactionType.PaypalPayment: this.Payment = new PaypalPayment(config); break; default: break; } }
/// <summary> /// Initializes a new instance of the <see cref="PaymentClient" /> class. /// </summary> /// <param name="config">The configuration.</param> public PaymentClient(TransactionInfo config) { switch (config.Type) { case TransactionType.AliWebPayment: this.Payment = new AliWebPayment(config); break; case TransactionType.AliMobilePayment: this.Payment = new AliMobilePayment(config); break; case TransactionType.PaypalPayment: this.Payment = new PaypalPayment(config); break; default: break; } }