Payment Director

! Important for Upgrading !
!  There were major changes made in the core for nopCommerce 4.30 that may have impact on the expressions used in your Payment Director configuration.
!  Be sure to test your configuration.
!  You will no longer have direct access to sub-properties (navigation properties) that you previously used. For example
!  Don't use
!      ShippingAddress.StateProvince.Abbreviation
!  Just use
!      State
!  Alternately we've provide some helper methods
!      ShippingAddress.GetState().Abbreviation
!      ('State' returns the state abbreviation.)
!
!  Similarly, rather than using ShippingAddress.Country.TwoLetterIsoCode, just use Country, or  ShippingAddress.GetCountry().TwoLetterIsoCode
!
! (We'll be updating the blogs with more information. Contact us if you need assistance.)

! Important for Upgrading !
if you're doing an in-place upgrade of the database, then you already have the PaymentDirector table in the database and you need to:
a) if you are coming from nopCommerce version prior to 4.30, then you need to execute this SQL 
insert into [MigrationVersionInfo] (Version, AppliedOn, Description) 
values ('637283256551687541', getdate(), 'NopTools.PaymentDirector base schema');

b) if you are coming from nopCommerce version 4.30 or later, then you don't have to do anything. The MigrationVersionInfo table already has a record for the PaymentDirector base schema.




You can use the "Upload plugin or theme" button in the administration > Configuration > Local Plugins and point to the .zip file you downloaded from nopTools.com.  Or, if you want to do it manually, then put only the .zip file's  NopTools.PaymentDirector folder in your \Plugins folder. 

Then, restart your web application. Then, go to administration > Configuration > Local Plugins, and on the line with nopTools Payment Director, click the Install link.  Now, in nopCommerce administration, in the navigation left side bar, you will see a new NopTools menu.  It will have a Payment Director menu item.  Click it to configure Payment Director.
(If you are upgrading, then rather than 'click the Install link', just click "Reload list of Plugins")


By default, all Payment Methods that are marked Active in admin > Configuration > Payment Methods are available to your customers.  Add Payment Director Option records as needed to Hide options and calculate fees.

In the Payment Director configuration page, click the Import button to import the included PaymentDirectorSamples.txt file, to see example Option records.  (Note that many of the payment methods in the sample are no longer part of the core nopCommerce release; they can be downloaded from the marketplace.)

In order to utilize the features to have disabled payment methods, and to change the name of payment methods that the customer sees, replace your checkout views (.cshtml files) with the ones provided in the \Views\Checkout sub folder  (this is the \Views folder at the root of your web site, NOT the one in the NopTools.PaymentDirector folder).


To uninstall, after clicking the Uninstall link in the plugin configuration page, be sure to also remove the NopTools.PaymentDirector folder in your \Plugins folder.
You can keep Payment Director installed and disable it with the "Active" setting on the configure page.  You can still use the "Test" button when Active is not checked.


It's easiest to test your payment rules by using the "Test" button on the configuration page.

If you see an error message, then look in the Admin > System > Log for more details.

For additional debugging information, add the $Debug variable to the rules - e.g. 
0	(active)	$Debug		true

At this time, there is no formal user manual.  Refer to the blogs at www.nopTools.com for more information.  You can contact us at support@noptools.com .  If you need help in setting up a payment method scenario, be sure to provide us with a few examples.   

Without a License.txt file, Payment Director runs in evaluation (trial) mode.  In evaluation mode, you can checkout 5 times in the front end store, and then it will present a warning message. (Use of the "Test" button is unlimited)

When you are satisfied with Payment Director and wish to purchase a license, note the URL (or Domain) next to the Version information on the configuration page - e.g.  Version 1.34 (Evaluation. Domain=mydomain.com; URL=www.mydomain.com).  Be sure to copy the URL [Domain] exactly as it is presented (i.e. without the http:// prefix); you will need this when you purchase online at www.noptools.com.  If you are using the multiple store option in NopCommerce, then you need to purchase a license for each store (URL).   (Each license file generated is named License.txt;  be sure to name them uniquely when putting them in the plugin folder; the file name must be prefixed with "License" - e.g. License_store1.txt, License_store2.txt, etc.)

To uninstall, after clicking the Uninstall link in the plugin configuration page, be sure to also remove the NopTools.PaymentDirector folder from your \Plugins folder and restart your web application.


Thanks
