Reputation: 1479
I am currently trying to integrate PayPal into our existing Web Application.
The Web Application is using ASP.NET WebForms.
Since in WebForms we have a form element around (almost) everything, I wonder how to integrate a PayPal Button which uses a form itself.
Is there any way to do it?
Upvotes: 1
Views: 1069
Reputation: 15797
Yes. I do it in a three step process:
paypalbutton
).This may need to be modified to work with your specific code (but it may work as is):
$(document).ready(function() {
$("#paypalbutton").on("click",function(n) {
n.preventDefault();
$("#aspnetForm").attr("action","https://www.paypal.com/cgi-bin/webscr");
$("#aspnetForm").submit(); //or whatever your WebForms form element is called
});
});
Upvotes: 3