Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Saravanakumar 2 posts 32 karma points
    Jan 21, 2015 @ 15:05
    Saravanakumar
    0

    How to override 'PayPalWebSitePaymentsStandardPageBuilder ' class to send order lines using vb.net?

    We've created a shopping website, now we've integrated the Paypal payment service. Now the client is asking to send the full order details.

    So I tried to override the 'PayPalWebSitePaymentsStandardPageBuilder' Class using below vb.net code:

    Imports UCommerce
    Imports UCommerce.Transactions.Payments
    Namespace Payment
        Public Class PaypalMethod
            Inherits UCommerce.Transactions.Payments.PayPal.PayPalWebSitePaymentsStandardPageBuilder
            Protected Overrides Function GetParameters(paymentRequest As PaymentRequest) As IDictionary(Of String, String)
                Dim Parameters = MyBase.GetParameters(paymentRequest)
                Parameters.Add("", "")
                Return Parameters
            End Function
        End Class
    End Namespace

    But I got the below error on the build:

    Class 'PaypalMethod' must declare a 'Sub New' because its base class 'UCommerce.Transactions.Payments.PayPal.PayPalWebSitePaymentsStandardPageBuilder' does not have an accessible 'Sub New' that can be called with no arguments.
    

    Please help me in fixing this issue asap.

    Thanks in advance

  • Martin 181 posts 740 karma points
    Jan 21, 2015 @ 19:24
    Martin
    0

    Hi Saravanakumar,

    I'm not the sharpest knife when it comes to VB.net. It doesn't seem that you're implementing a constructor which calls the base constructor. I have no idea how that works with VB.net but my first guess is that you're missing the constructor with a call the base constructor.

    best regards Martin

  • Saravanakumar 2 posts 32 karma points
    Jan 22, 2015 @ 11:16
    Saravanakumar
    0

    Hi Martin,

    Thanks for your reply. Yes I missed the constructor of the base class, now I've corrected it.

    But I am trying to overwrtie the existing parameter "item_name_1", "amount_1" as it is defaultly picking up the "Sum" and "Order total". But it's saying that 'item_name_1' is a read only property.

    Parameters.Add("item_name_1", "Prodcut1") 
    Parameters.Add("amount_1", "200")
    Parameters.Add("quanity_1", "1")

     

  • Martin 181 posts 740 karma points
    Jan 23, 2015 @ 18:39
    Martin
    100

    Hi again,

    Parameters is a Dictionary so you can not add the same value twice. So you should be able to do this instead:

    Parameters["itemname1"] = "Product 1".

    Best regards Martin

Please Sign in or register to post replies

Write your reply to:

Draft