in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Payment gateway for dash commerce 3.0.1?

Last post 09-02-2008 4:09 AM by venkatagopalan. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 07-24-2008 5:41 PM

    • Karan
    • Top 75 Contributor
    • Joined on 07-21-2008
    • Posts 16

    Payment gateway for dash commerce 3.0.1?

    Hi

    I am new to c# (but done some xml transaction, encryption using VS (VB)2005). Please help me to build new payment gatway for dashcommerce 3.0.1. I have done the following (one of the forum member told me but I couldn't get it)

    1. Create a class file  (So I created one class file named "DFGDPaymentProvider")
    2. Looked at the code "PaypalProPaymentprovider " (Copied this code to newly created class file "DFGDPaymentProvider" - to modify for my need)
    3. PaypalProPaymentprovider refering to "IPayPalPaymentProvider" and "PaypalService" (If I am right) - Do I have to copy this and edit?

    So could someone please help me how to have new payment gateway.? Like which file to copy and save with diffrent file name then I can edit those file to have a Newpayment gateway. I realy appreciate If any one guide me or tell me which file to edit.

     Advance thanks

  • 07-24-2008 6:16 PM In reply to

    Re: Payment gateway for dash commerce 3.0.1?

    First if you know VB.NET then you can add another assembly and create the provider there. also you can use Reflector to see the code in VB.NET so that you can see how it is done.

    How the payment provider works is that you create a class then you impliment the IPaymentProvider interface (If this payment provider works like PayPal Standerd that means that you go off to there (your payment providers) site then you would impliment IPayPalPaymentProvider that also impliments IPaymentProvider)

    Now you have to add all the members from IPaymentProvider that would be

    public class DFGDPaymentProvider : IPaymentProvider {
        public Transaction Authorize(Order order){
               //Put you code here
        }

        public Transaction Charge(Order order){
               //Put you code here
        }

        public Transaction Refund(Transaction transaction, Order order){
               //Put you code here
        }

    }

    Now to fill in this logic you have to find out how to connect to your payment provider like do they use a WebService or Http Post or whatever
    what info do you have to send to them how do format the data were do you send the data, etc...

    The thing with PaypalProPaymentProvider is that the main logic is delegated to Store\Services\PaymentService\PayPal\PayPalService.cs so you look there to get the idea.

    Now most of these methods take a Order that has the information of the current order like CreditCard Info, total amount, tax, etc...
    And they return a Transaction that you store the information that was returnd from the PaymentProvider and some more info.

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 08-04-2008 11:28 AM In reply to

    • Karan
    • Top 75 Contributor
    • Joined on 07-21-2008
    • Posts 16

    Re: Payment gateway for dash commerce 3.0.1?

    Thanks for the great help

     I have downloaded "Zeropaymentprovider" Which implement "Ipaymentprovider" but how do I make this as my default provider. Because I need to test the orders placed through this website and plan to convert this "Zeropayment provider" to our own provder(DGFD payment provider).

     Advance thanks

  • 08-04-2008 1:39 PM In reply to

    Re: Payment gateway for dash commerce 3.0.1?

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 08-04-2008 3:48 PM In reply to

    • Karan
    • Top 75 Contributor
    • Joined on 07-21-2008
    • Posts 16

    Re: Payment gateway for dash commerce 3.0.1?

    Hi yitzchok

     The link explain just about how to use admin panel. Please let me explain ...

    Also I am using IIS 5.1, XP and NOT using ssl.

    1.  XYZpaymentProvider ~/admin/controls/configuration/paymentproviders/XYZpaymentconfiguration.ascx  - This is the copy of paypalstandardconfiguration (changed the class names)
    2. Created a class file and copy and paste the code from "Zeropaymentprovider" - this file is under /services/paymentservice/XYZpaymentprovider.cs

    The page display the below two provider

    PayPalProPaymentProvider
    PayPalStandardPaymentProvider

    -----> but not showing the one I added(XYZpaymentprovider)

    The error log created the following errors

    System.NullReferenceException: Object reference not set to an instance of an object.
       at MettleSystems.dashCommerce.Web.admin.controls.configuration.paymentproviders.HSBCpaymentconfiguration.SetPayPalStandardConfigurationProperties() in J:\DWNLOAD\dashcom\Web\admin\controls\configuration\paymentproviders\XYZpaymentconfiguration.ascx.cs:line 190
       at MettleSystems.dashCommerce.Web.admin.controls.configuration.paymentproviders.XYZpaymentconfiguration.Page_Load(Object sender, EventArgs e) in J:\DWNLOAD\dashcom\Web\admin\controls\configuration\paymentproviders\XYZpaymentconfiguration.ascx.cs:line 112

    Useful guidance will greatly appriciated.

    Advance thanks

  • 08-04-2008 10:20 PM In reply to

    Re: Payment gateway for dash commerce 3.0.1?

    It looks like there are some errors in your code.
    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 08-05-2008 4:03 AM In reply to

    • Karan
    • Top 75 Contributor
    • Joined on 07-21-2008
    • Posts 16

    Re: Payment gateway for dash commerce 3.0.1?

    Hi

    I know there is error in code, thats why I am posting here. What I have done is I copied the "papalstandardconfiguration.ascx" to my newly created "XYZpaymentconfiguration" and the error I am getting in the below code. Can anybody figure out ??? (All I am trying to do is get the Zeropaymentprovider works with my site.)

    /// <summary>

    /// Sets the pay pal standard configuration properties.

    /// </summary>

    private void XYZConfigurationProperties()

    {

    ltDescription.Text =
    HttpUtility.HtmlDecode(base.Provider.Description);

    pnlSettings.GroupingText = LocalizationUtility.GetText("pnlPayPalStandardConfiguration");

    lblDescriptionTitle.Text = LocalizationUtility.GetText("lblPayPalStandardDescriptionTitle");

    LocalizationUtility.AddButtonText(btnSave);

    LocalizationUtility.AddLabelText(lblIsLive);

    LocalizationUtility.AddHoverHelp(hlIsLiveHelp);

    LocalizationUtility.AddLabelText(lblBusinessEmail);

    LocalizationUtility.AddHoverHelp(hlBusinessEmailHelp);

    LocalizationUtility.AddLabelText(lblPdtId);

    LocalizationUtility.AddHoverHelp(hlPdtId);

    LocalizationUtility.AddRfvErrorMessageText(rfvBusinessEmail);

    LocalizationUtility.AddRfvErrorMessageText(rfvPdtId);

    }

  • 08-05-2008 10:04 AM In reply to

    Re: Payment gateway for dash commerce 3.0.1?

    Answer

    If you think its from this code then maybe

    HttpUtility.HtmlDecode(base.Provider.Description);

    Provider
    is null did you try debugging this in VS.

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 08-05-2008 4:37 PM In reply to

    • Karan
    • Top 75 Contributor
    • Joined on 07-21-2008
    • Posts 16

    Re: Payment gateway for dash commerce 3.0.1?

    Hi

    I found the problem in the other part of the code(yes mixed up the providername and it caused null error). THANKS a lot for the help. Now I am doing my provider.

  • 09-02-2008 4:09 AM In reply to

    Re: Payment gateway for dash commerce 3.0.1?

    Hi Karan,

    iam also in the same state i copied the paypal standard configuration and working on it, did you successfully finished this, if so please help me with the coding... iam breaking my head on this for the past 2 weeks...

Page 1 of 1 (10 items)