我正在為我的客戶開發定制的付款方式插件。我是 Nopcommerce 插件開發的初學者,這是我的插件目錄結構:代碼這是我的CODBookingPaymentProcessor.cspublic class CODBookingPaymentProcessor : BasePlugin, IPaymentMethod{ #region Ctor public CODBookingPaymentProcessor() { } #endregion #region Methods public bool SupportCapture => false; public bool SupportPartiallyRefund => false; public bool SupportRefund => false; public bool SupportVoid => false; public RecurringPaymentType RecurringPaymentType => RecurringPaymentType.NotSupported; public PaymentMethodType PaymentMethodType => PaymentMethodType.Standard; public bool SkipPaymentInfo => false; public string PaymentMethodDescription => "Pay booking and extras before order placing."; public CancelRecurringPaymentResult CancelRecurringPayment(CancelRecurringPaymentRequest cancelPaymentRequest) { return new CancelRecurringPaymentResult(); } public bool CanRePostProcessPayment(Order order) { if (order == null) throw new ArgumentNullException(nameof(order)); //it's not a redirection payment method. So we always return false return false; } public CapturePaymentResult Capture(CapturePaymentRequest capturePaymentRequest) { return new CapturePaymentResult { Errors = new[] { "Capture method not supported" } }; } public decimal GetAdditionalHandlingFee(IList<ShoppingCartItem> cart) { return 0; } public ProcessPaymentRequest GetPaymentInfo(IFormCollection form) { return new ProcessPaymentRequest(); } public string GetPublicViewComponentName() { return "CODBooking"; } public bool HidePaymentMethod(IList<ShoppingCartItem> cart) { return false; } public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest) { }
添加回答
舉報
0/150
提交
取消