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.

  • Marc Love (uSkinned.net) 445 posts 1787 karma points
    Jan 30, 2013 @ 15:55
    Marc Love (uSkinned.net)
    0

    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

     

  • Adam Jenkin 71 posts 226 karma points
    Jan 30, 2013 @ 16:11
    Adam Jenkin
    0

    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)

    As for passing the address, uCommerce uses the method described here for passing information over to paypal:
    I cant immediately see how you pass this but might be worth a read.
    Adam
  • Marc Love (uSkinned.net) 445 posts 1787 karma points
    Jan 30, 2013 @ 16:20
    Marc Love (uSkinned.net)
    0

    Thanks for the link. Still a bit confused by the PaymentRequest. Will dig a bit deeper with Reflector.

    Cheers,

    Marc

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jan 31, 2013 @ 07:53
    David Brendel
    0

    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).

    Hope that helps a bit.

Please Sign in or register to post replies

Write your reply to:

Draft