WorldPay signature field

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/7/2013 6:37:31 AM
Gravatar
Total Posts 167

WorldPay signature field

I have integrated world pay to invoice pro and my shopping cart and all appears to work well.

However there are issues when trying to set up bespoke features or to create your own "buy now" button.

In the Mojoportal ecommerce set up for World pay one of the required fields is :<add key="CommerceGlobalWorldPayMd5Secret" value="yourmd5secret" />

Which if you need to match this to the one you have set up In the Worldpay installation.
However when trying to create a button or to implement the recurring payments there is an issue that comes up where worldpay asks for the "signatureFields". These "signatureFields" are very few parameters you set in your worldpay installation to prevent fraud. For example amount:currency:cartId This passes these fields with the transactions in the form of a hash encryption code which can be decrypted to ensure that the values such as amount not been changed.


To work in the mojoportal installation I have left the signature field blank and the e-commerce applications work fine. However when trying to create a bespoke "buy now" button Worldpay expects that (as MD5 secret is populated in the installation) the signature fields must have some values.
 

|If the Signature fields are now populated there may be a conflict with the mojoportal installation.
Does mojoportal set the signature fields or will there be an impact if we set them in the worldpay installation?


If so when creating a bespoke by now button or recurring payments feature you may need to request a new installation from worldpay to do this.

 

3/7/2013 7:12:28 AM
Gravatar
Total Posts 18439

Re: WorldPay signature field

Hi,

I don't know exactly what you mean by a "bespoke buy now button". You cannot add a plain html button with a form in the html content feature if that is what you mean for the same reason you cannot do it with PayPal, you must use an actual asp.net button that posts the existing form rather than add an html form. Obviously the html content feature could not generate the md5 secret for you but it also cannot have an html form element in the content.

If you are doing actual custom development developing custom features in Visual Studio you can do it the same way we do it in all of our ecommerce features. We have a WorldPayPurchaseButton included in mojoPortal core that can be used in custom development the same as it is used in all of our ecommerce features and it generates the md5 hash and signature field html based on properties set on the control. Or if that button control doesn't meet your needs you could implement your own using similar code. There is nothing that limits what can be done in bespoke custom development.

Hope that helps,

Joe

3/7/2013 8:36:16 AM
Gravatar
Total Posts 167

Re: WorldPay signature field

The source code seems to answer all the questions on this (for now). That is a grfeat repository of code, cheers.

3/7/2013 9:16:38 AM
Gravatar
Total Posts 18439

Re: WorldPay signature field

Glad that helps, if you want to see example code where that button is configured see the SetupWorldPay method in the Checkout page for webstore.

Note that what we set as the cartid on the button is not the actual cart guid but the guid of the worldpay log. The cart is serialized as a string and stored in the log and then reconstituted from the log if the transaction is completed. This prevents manipulation of the order. For example if we used the actual cart guid then the user could use 2 browser tabs and after they are posted over to WorldPay they could add items to the cart from the other browser tab and try to get more than they actually purchased at WorldPay. By serializing the current state of the cart just before sending them to WorldPay we can be sure we are re-constituting it just as it was. Each time the cart is modified we create a new log so the guid would not match if the user tries to engineer some manipulation with 2 browser windows. We use a similar technique in all cases where the user completes payment on another site like PayPal, Google, or WorldPay.

You must sign in to post in the forums. This thread is closed to new posts.