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.
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.
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.
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:
But I got the below error on the build:
Please help me in fixing this issue asap.
Thanks in advance
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
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.
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
is working on a reply...