How to pass the AuthorizeNetPaymentSettings from the CheckoutController to the PaymentAuthorizeNetController.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 年 前
How to pass the AuthorizeNetPaymentSettings  from the CheckoutController to the PaymentAuthorizeNetController.

I mean how to pass the AuthorizeNetPaymentSettings  values from

\Nop.Web\Controllers\CheckoutController.cs

to

\Plugins\Nop.Plugin.Payments.AuthorizeNet\Controllers\PaymentAuthorizeNetController.cs

I don't want to use default value for AuthorizeNetPaymentSettings from Setting table.

public PaymentAuthorizeNetController(ISettingService settingService,
            ILocalizationService localizationService, AuthorizeNetPaymentSettings authorizeNetPaymentSettings)
        {
            this._settingService = settingService;
            this._localizationService = localizationService;
            
            this._authorizeNetPaymentSettings = authorizeNetPaymentSettings;
        }
11 年 前
arlen wrote:
How to pass the AuthorizeNetPaymentSettings  from the CheckoutController to the PaymentAuthorizeNetController.

I mean how to pass the AuthorizeNetPaymentSettings  values from

\Nop.Web\Controllers\CheckoutController.cs

to

\Plugins\Nop.Plugin.Payments.AuthorizeNet\Controllers\PaymentAuthorizeNetController.cs

I don't want to use default value for AuthorizeNetPaymentSettings from Setting table.

public PaymentAuthorizeNetController(ISettingService settingService,
            ILocalizationService localizationService, AuthorizeNetPaymentSettings authorizeNetPaymentSettings)
        {
            this._settingService = settingService;
            this._localizationService = localizationService;
            
            this._authorizeNetPaymentSettings = authorizeNetPaymentSettings;
        }


I don't understand. AuthorizeNetPaymentSettings is populated from DB (Setting table). You want to get the settings but not the ones in the DB. Can you explain more? :)
11 年 前
I need to load AuthorizeNetPaymentSettings  based on each AffiliateID.
Each AffiliateID has it's own AuthorizeNetPaymentSettings values.
So I need  to send different AuthorizeNetPaymentSettings values based on each AffiliateID through CheckoutController.
11 年 前
arlen wrote:
I need to load AuthorizeNetPaymentSettings  based on each AffiliateID.
Each AffiliateID has it's own AuthorizeNetPaymentSettings values.
So I need  to send different AuthorizeNetPaymentSettings values based on each AffiliateID through CheckoutController.


You should be able to get the AffiliateId across controllers by mean of:

_workContext.CurrentCustomer.AffiliateId


:D
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.