1

The WorldPay payment gateway suggests using this HTML to take the customer to the payment page:

<form action="https://select-test.wp3.rbsworldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId"  value="211616">
<input type="hidden" name="cartId" value="abc123">
<input type="hidden" name="currency" value="GBP">
<input type="hidden" name="amount"  value="0">
<input type="hidden" name="desc" value="">
<input type="hidden" name="testMode" value="100">
<input type="submit" value="To Payment!">
</form>

How to I put this form on my page? The problem is I have a master page which wraps the content pages content in the ASP.net form, I can't nest the forms.

2 Answers 2

1

This is a bit of a hack, but I have used this with paypal in the past. Basiscally just put and extra form above the form you are attempting to post as in the following:

<form>
</form>
<form action="https://select-test.wp3.rbsworldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId"  value="211616">
<input type="hidden" name="cartId" value="abc123">
<input type="hidden" name="currency" value="GBP">
<input type="hidden" name="amount"  value="0">
<input type="hidden" name="desc" value="">
<input type="hidden" name="testMode" value="100">
<input type="submit" value="To Payment!">
</form>

Enjoy!

Sign up to request clarification or add additional context in comments.

Comments

0

You can customize the HtmlForm to get this to work. I gave a code sample here:

How to get past embedding a html form for paypal buttons asp.net

http://www.codersbarn.com/post/2008/03/08/Solution-to-ASPNET-Form-PayPal-Problem.aspx

I've used this several times with master pages :-)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.