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.

  • Rick 92 posts 278 karma points
    Jun 04, 2013 @ 10:43
    Rick
    0

    Additional variables on post to WorldPay

    Hi,

    I've pretty much integrated my uCommerce site with Worldpay and got things working how I'd like.

    However, there are some additional variables that I'd like to include in my post that is sent to Worldpay.

    My site is multi-lingual and when the customer has selected the "FR" language (via my language selector) - I'd like the language to be consistent when they are transferred to my payment pages (hosted with Worldpay)

    Therefore, I'd like to be able to include...

    <input type="hidden" name="lang" value="fr">

    ... in my original post so that the FR language is pre-selected when they arrive at my payment pages.

    I've absolutely no idea where to include this variable. I've tried inserting it on my "preview" page, just before the customer clicks the "Proceed to Worldpay" button - but with no luck.

    Can anyone help at all?

    Many thanks,

    Rick Lynch

  • Morten Skjoldager 440 posts 1499 karma points
    Jun 07, 2013 @ 11:06
    Morten Skjoldager
    1

    Hi Rick, 

    This should totally be doable. 

    You'll face two task to acomplish this;

    1. Create a new instance of the WorldPayPageBuilder. Take a look in .peek to see how our service does the job. All you have to do is copy paste the solution into your service and modify it slightly to also contain the language. You can also mail me at msk at ucommerce dot dk and i'll provide you with the code. But i'll recommend you use .peek as it is a free and very awsome tool that might come handy for you later on.

    2. register your new component in the IoC container in order for the framework to find your service instead of the default one.

    In custom.config under ucommerce/configuration, you would want to register a page builder that overrides the default one, by id. So the entry in the config would look like this;

    <component id="WorldPayPageBuilder"                                                                                                  service="yourassembly.yournamespace.youOverriddenPageBuilder, yourassembly.yournamespace"                              type="yourassembly.yournamespace.youOverriddenPageBuilder, yourassembly.yournamespace" />

    Hope this helps

    Regards

    Morten

  • Rick 92 posts 278 karma points
    Jun 07, 2013 @ 16:17
    Rick
    0

    Hi Morten,

    Thanks for responding.

    I'll have a crack at doing that and if I am successful, I'll post my findings on here in due course.

    Thanks again,

    Rick

     

Please Sign in or register to post replies

Write your reply to:

Draft