Wednesday, October 8, 2008

Zero Payment Provider for dashCommerce

Below are some instructions on how to add a ZeroPaymentProvider to your exsisting dashCommerce installaton. This is still in very early stages and I need some people to test it, recommend changes etc. It currently only works with PayPalStandard but will be added to PayPal Express after some people have provided feedback.

I suggest making all these changes in a TESTING environment first, maybe sure a backup is taken before making any changes.

SNEAK PEAK.




1. Copy ZeroPaymenyProvider.cs to > store > services > Payment Service

This class does basically nothing other than allows to hold a description which we will use after this initial release.

2. Overwrite checkout.aspx.cs, paypalcheckout.aspx, paypalcheckout.aspx.cs and paypalcheck.aspx.designer.cs

With any luck hopefully you haven't made any previous changes to these files. checkout.aspx.cs basically is just adding another line of code and all 3 PayPalChekout file have been extensively modified to allow for the new accordion pane.

3. Copy the 3 ZeroPaymentConfiguration files to Web > Admin > Controls > Configuration > Payment Providers

4.Add these resources to Labels.resx or if made no previsous modification just copy the one over in the zip file

hlZeroPaymentHelp - This will be a description that is displayed to the customer.
lblZeroPayment - Description for Customer:
lblZeroPaymentDescriptionTitle - Zero Payment
pnlZeroPaymentConfiguration - Zero Payment Conifguration
rfvZeroPayment - This field is required.

5. Overwrite Store/ Enumerations.cs with one in zip file. Adds 1 more enumeration

6. Add a single entry to database

INSERT INTO dashCommerce_Store_OrderStatusDescriptor
(OrderStatusId, Name, CreatedBy, ModifiedBy)
VALUES (700,'Pay On Pickup','SYSTEM','SYSTEM')

7. Build Project and Deploy/Publish Website.

8. Login to admin control panel

Go to Configuration > Payment Providers > Manage Payment Providers

Fill in fields:
Name: ZeroPaymentProvider
Description: Whatever you want
Configuration Control Path: ~/admin/controls/configuration/paymentproviders/zeropaymentconfiguration.ascx

Go to Configuration > Payment Providers > Configure Payment Providers

Fill in the appropaite fields. If you only configure 1 provider then the accordion pane "Payment Method" will not be showne when making an order. Therefore if you want to see the accordion pane then make sure you configure both the Zero Payment Provider and the PayPal Standard Provider.

We will need to do something about the names but this just fixed after some testing and feedback has been completed.

The files you need can be downloaded from:
http://www.trading.co.nz/media/482/zeropaymentprovider.zip

Thanks,
Matthew

2 comments:

hejunming said...

hi,Matthew
I have tried the steps following your blog,but i failed to rebuild my dashcommerce 3.01.
by the way,i think the project dashcomerce could be more valuable in China if some modification made to the project. but i am not a developer,i can not do this kind of work. I wonder to know if you are interested at this kinds of business?
Now i am living in Shanghai,China. I hope we would keep on contacting.
hejunming@gmail.com

Unknown said...

Thanks for sharing.
I want to implement Pay by Cash/Cheque payment provider in dashcommerce.
How???
Awaiting your reply.