Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. <img id="paypalVerify" src="~/Images/getverifiedbypaypal.jpg" onclick="windowPop()" />
  2.  
  3. <script>
  4. function windowPop() {
  5.  
  6. //Create Form Attributes
  7. var paypalForm = document.createElement("paypalForm");
  8. paypalForm.target = "paypalPopup1";
  9. paypalForm.method = "POST"; // or "post" if appropriate
  10. paypalForm.action = "https://www.sandbox.paypal.com/webapps/auth/loginauth";
  11.  
  12. //Paypal Application ID
  13. var appid = document.createElement("input");
  14. appid.type = "text";
  15. appid.name = "appid";
  16. appid.value = "**************";
  17. paypalForm.appendChild(appid);
  18.  
  19. //Paypal authend
  20. var authend = document.createElement("input");
  21. authend.type = "text";
  22. authend.name = "authend";
  23. authend.value = "sandbox";
  24. paypalForm.appendChild(authend);
  25.  
  26. //Paypal scopes
  27. var scopes = document.createElement("input");
  28. scopes.type = "text";
  29. scopes.name = "scopes";
  30. scopes.value = "profile email address phone";
  31. paypalForm.appendChild(scopes);
  32.  
  33. //Paypal locale
  34. var locale = document.createElement("input");
  35. locale.type = "text";
  36. locale.name = "locale";
  37. locale.value = "en-us";
  38. paypalForm.appendChild(locale);
  39.  
  40. //Paypal locale
  41. var returnurl = document.createElement("input");
  42. returnurl.type = "text";
  43. returnurl.name = "returnurl";
  44. returnurl.value = "http://localhost:57559/";
  45. paypalForm.appendChild(returnurl);
  46.  
  47. document.body.appendChild(paypalForm);
  48.  
  49. var paypalPopup = window.open("", "paypalPopup1", "status=0,title=0,height=600,width=800,scrollbars=1");
  50. if (paypalPopup) {
  51. paypalForm.submit();
  52. } else {
  53. alert('You must allow popups for this map to work.');
  54. }
  55. }
  56. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement