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.
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;
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
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;
Hope this helps
Regards
Morten
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
is working on a reply...