我正在為我的客戶開發(fā)定制的付款方式插件。我是 Nopcommerce 插件開發(fā)的初學(xué)者,這是我的插件目錄結(jié)構(gòu):代碼這是我的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) { }
1 回答

HUH函數(shù)
TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超4個(gè)贊
.cshtml 文件名“Boooking.cshtml”中有錯(cuò)別字 :) 仔細(xì)看。
- 1 回答
- 0 關(guān)注
- 94 瀏覽
添加回答
舉報(bào)
0/150
提交
取消