Search code examples
c#asp.net-mvcwebformsbraintree

Braintree payments using webforms


Is it possible to use Braintree payments with ASP.NET Web Forms? Braintree provides an MVC example.

I tried this solution but it doesn't work properly. Here is my server side code and my template; I changed the original version a little bit.

The main problem is that there is no action when the submit button is clicked -- the page just reloads. Why?


Solution

  • I work at Braintree.

    I wrote a simple webforms example using Transparent Redirect that might help you with your issue.

    Looking at your code and what you are describing as the issue, I would guess SessionUtils.Instance.TransparentRedirectURL is returning an empty string or null, so when you post the form it goes back to the current page.