Passing Orderline and Billing Address details to PayPal
I saw in a previous post that you can override PayPalWebSitePaymentsStandardPageBuilder in order to change the details that are sent to PayPal by default.
The following line however gives me an error:
var baseParameters = base.GetParameters();
GetParameters is expectiog PaymentRequest to be passed to it. Where do I get this from?
Also, is this the same approach I should be using to pass billing address to PayPal so that the user doesnt need to add this information again?
I had to build a custom PageBuilder for using the OrderNumber and not the Refernece.
It looks like this:
public class CustomPayPalPageBuilder : UCommerce.Transactions.Payments.PayPal.PayPalWebSitePaymentsStandardPageBuilder
{
public CustomPayPalPageBuilder(CommerceConfigurationProvider configProvider) : base(configProvider) { }
protected override IDictionary GetParameters(PaymentRequest paymentRequest)
{
IDictionary dictionary = new Dictionary();
dictionary = base.GetParameters(paymentRequest);
......
return dictionary;
}
}
So you just have to override the GetParameters and it automatically gets the Payment Request.To actually use the PageBuilder you have to add it to the custom.config file(UCommerce3).
Passing Orderline and Billing Address details to PayPal
I saw in a previous post that you can override PayPalWebSitePaymentsStandardPageBuilder in order to change the details that are sent to PayPal by default.
The following line however gives me an error:
var baseParameters = base.GetParameters();
GetParameters is expectiog PaymentRequest to be passed to it. Where do I get this from?
Also, is this the same approach I should be using to pass billing address to PayPal so that the user doesnt need to add this information again?
Cheers,
Marc
Hi Marc,
The BuildBody method signature from AbstractPageBuilder should give you the PaymentRequest
http://www.ucommerce.dk/docs/html/M_UCommerce_Transactions_Payments_AbstractPageBuilder_BuildBody.htm
(or have a look with reflector at how the current one works :P)
Thanks for the link. Still a bit confused by the PaymentRequest. Will dig a bit deeper with Reflector.
Cheers,
Marc
I had to build a custom PageBuilder for using the OrderNumber and not the Refernece.
It looks like this:
So you just have to override the GetParameters and it automatically gets the Payment Request.To actually use the PageBuilder you have to add it to the custom.config file(UCommerce3).
Hope that helps a bit.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.