Making the web work. Together.

ePDQ intergration for nopCommerce part 2

Posted by Ed on 10 July 2009 | 0 Comments

Tags: , , ,

Why this second blog?

Since adding my speculative blog post about there not being an ePDQ payment module available for nopCommerce, and me having to write one, I've had a few requests from people for the code.

Please note there is at least one commercial offering out there, so if you aren't a developer, want timely support or need some guaranteed level of maintenance, have a look at their offering. If you just want a minimal module with scant instructions and are happy to roll your sleeves up, then I have added a project on [url=https://sourceforge.net/projects/epdq-nopcomm/]SourceForge[/url] so you can get the files.

Why do this when there is already a version out there?

Simply put, I didn't want to pay for it. Nop makes it pretty easy to add new payment modules to the system so I thought I'd just get on with it.

Why is your version being release for free?

There are two reasons.

One. I don't plan on spending the time to make it a 'commercial' product.

Two. Nop Commerce is open source, I have used it on many projects and I'd like to maintain the spirit of community by putting omething back in.

Things to be aware of with my ePDQ module

This has been developed on a nop 1.5 install. I have a 1.6 site I can test it on, but it should work without too many issues on older builds. i've not used > 1.6 yet, so I am unaware if the payment module structure (on which this relies) is different.

It has been 'ported' from another similar module, so potentially has some left over bits and bobs in there.

It is still considered a 'beta' project.

Some data, settings or functionality may be missing simply because I didn't need it.

The structure of the module follows nopCommerce styles and implemetation methods for payment modules. As such, it has all the admin options in the 'Payment Method' details screen etc.

We accept no responsibility for loss or problems you may incur with you using this modules or following the suggested implementation process in this blog. The module is intended as a demonstration of integrating an ePDQ payment module in to nopCommerce.
 
[b]On with the show[/b]

Some prerequisites:

An ePDQ account.
A nop commerce web site.

Adding the module and setting it all up:

Step 1:

Configure your ePDQ CPI details. I won't be covering this here, so make sure you understand what needs to be done. Full details can be found in the integration guide [url=http://www.barclaycard.co.uk/business/existing-customers/activate-epdq-cpi/] from Barclays[/url].

Step 2:

Download the sample ePDQ module files from [url=https://sourceforge.net/projects/epdq-nopcomm/]SourceForge[/url].

Unzip the files somewhere, ready to copy into the project.

Step 3:

Copy the Necesse.Payment.ePDQ folder from the ZiP file into the \Project\Payment folder.

In the solution explorer, find the payment projects folder, select add existing project and select the ePDQ module project.

Step 4:

From the ZiP file contents, copy the ePDQ folder from 'Administration/Payment' into the same folder in the nopCommerce store. (Or whatever you've called your site root folder in the solution).

This contains the admin config pages for the module. You should use 'Show all files' from the solution explorer and add these files to the project.

Step 5:

From the ZiP file, copy the ePDQ folder directly into the root of the web site. Add the files to the project as above.

These are the files that ePDQ uses to update payment status back to nop. If you don't set this option in ePDQ, they aren't needed. NOTE: the reason these files are in a folder is that ePDQ requires a digest protected file to post back payment statuses. It's all in the manual! For nop/Windows, this means adding a user to the Web Server and setting prmissions in IIS (NOT NT) for basic challenge/response on this folder.

Step 6:

From the ZiP, copy the Templates/Payment/ePDQ folder into the same path (Templates/Payment) inside nopCommerceStore (or whatever you've called your site).

Step 7:

Add a reference to the ePDQ module in the nopCommerce Store.

Run nopCommerce and make sure it all builds.

You can do this next bit in DEV up to a point (trying it in debug first is recommended), or just deploy the updated files to the web server and set it up there. In dev, ePDQ wil throw an invalid url error for localhost, even if you set it in the CPI admin tool.

Sign in to nop admin and navigate to the Configuration/Payments/Payment Methods page.

Select 'Add New'.

Fill in the form as required. The important settings and values are:

Configuration template path: Payment\ePDQ\ConfigurePaymentMethod.ascx

User template path: ~\Templates\Payment\ePDQ\PaymentModule.ascx

Class name: Necesse.Payment.ePDQ.ePDQPaymentProcessor,Necesse.Payment.ePDQ

System keyword: EpDQ

Obviously set it to active and I just added ePDq for the display name and name values.

Once you have added this, select 'save' and you will now see a 'Configuration' tab in the module admin.

These are all settings that you need to define or get from ePDQ with the exception of 'Use test mode:'. This is simply a settings flag that writes the response from ePDQ to the nop log. It is handy for debugging and testing writeback actually happens. As you know, ePDQ is a bit 'underfacilitated' for us developers.

[b]I think that's it?[/b]

I think that's everything. As I mentioned, this is a 'beta' module that has been tested only by me, so if you find anything awry or need something I've missed, just let me know.

[b]Things to check when troubleshooting[/b]

In theory all the files are in the ZiP, my instructions are correct and my basic testing has covered all the reasonable bases.

If your site builds, I would imagine the majority of errors you may get will be in the ePDQ setup, but as convoluted and odd as it is, it's all in the manual. It's just really easy to miss something.

Have fun...


Post your comment

Comments

No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments