Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <img id="paypalVerify" src="~/Images/getverifiedbypaypal.jpg" onclick="windowPop()" />
- <script>
- function windowPop() {
- //Create Form Attributes
- var paypalForm = document.createElement("paypalForm");
- paypalForm.target = "paypalPopup1";
- paypalForm.method = "POST"; // or "post" if appropriate
- paypalForm.action = "https://www.sandbox.paypal.com/webapps/auth/loginauth";
- //Paypal Application ID
- var appid = document.createElement("input");
- appid.type = "text";
- appid.name = "appid";
- appid.value = "**************";
- paypalForm.appendChild(appid);
- //Paypal authend
- var authend = document.createElement("input");
- authend.type = "text";
- authend.name = "authend";
- authend.value = "sandbox";
- paypalForm.appendChild(authend);
- //Paypal scopes
- var scopes = document.createElement("input");
- scopes.type = "text";
- scopes.name = "scopes";
- scopes.value = "profile email address phone";
- paypalForm.appendChild(scopes);
- //Paypal locale
- var locale = document.createElement("input");
- locale.type = "text";
- locale.name = "locale";
- locale.value = "en-us";
- paypalForm.appendChild(locale);
- //Paypal locale
- var returnurl = document.createElement("input");
- returnurl.type = "text";
- returnurl.name = "returnurl";
- returnurl.value = "http://localhost:57559/";
- paypalForm.appendChild(returnurl);
- document.body.appendChild(paypalForm);
- var paypalPopup = window.open("", "paypalPopup1", "status=0,title=0,height=600,width=800,scrollbars=1");
- if (paypalPopup) {
- paypalForm.submit();
- } else {
- alert('You must allow popups for this map to work.');
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement