Solved

Paypal button does not submit

Posted on 2013-02-02
10
336 Views
Last Modified: 2016-03-24
I generated a PayPal payment button from the PayPal website and dropped the button onto my page and nothing happens when I click the button.  What am I doing wrong?  Where do I begin?

Here is the button.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="1234567">
<table>
<tr><td><input type="hidden" name="on0" value="MyService">My Service</td></tr><tr><td><select name="os0">
<option value="Category1">Product 1 $65.00 CAD</option>
<option value="Category2">Product 2 $140.00 CAD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="CAD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Open in new window


Thanks.
0
Comment
Question by:DanielAttard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 38847297
line 11, replace :  name="submit"
by :  name="mysubmit"

in you put your form in an iframe :
line 1, replace :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
by :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
0
 

Author Comment

by:DanielAttard
ID: 38847312
Thanks leakim971, I think there is a type in your comment.  What is it you are telling me about iframe?
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38847313
do you have your paypal form inside an iframe?
0
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

 

Author Comment

by:DanielAttard
ID: 38847314
No, I don't.  Not familiar with iframe.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38847321
so what about ?
line 11, replace :  name="submit"
by :  name="mysubmit"

Open in new window


You add jQuery and Javascript zone, please post your code
0
 

Author Comment

by:DanielAttard
ID: 38847323
I am trying to make a call to the paypal form inside this js function:

function() {    
    // need call to PayPal here, before myStep1 and myStep2 
    $.when.apply(undefined, myStep1()).done(function () {
    $.ajax({
        url: sURL + "myController/myStep2",
        success: function() {  
                $.msg("Success Message", live:10000
                });
            },
        error: function(){
                $.msg("Error Message", live:10000
                });
            }
        }); 
    });
};

Open in new window


This is the paypal form that I am trying to implement, but the form does not submit when I click the button:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_s-xclick">
  <input type="hidden" name="hosted_button_id" value="123456789">
  <input type="image"
      src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_SM.gif"
      border="0" name="submit"
      alt="PayPal - The safer, easier way to pay online!">
  <img alt="" border="0"
      src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1"
      height="1">
</form>

Open in new window


Any ideas why my form does not submit?
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38847329
Any ideas why my form does not submit?
Not really, sorry...
Please wait help from other EE members
0
 

Author Comment

by:DanielAttard
ID: 38847335
Ok, thanks anyway.  Frustrating afternoon for me  . . . .
0
 
LVL 14

Accepted Solution

by:
dejaanbu earned 500 total points
ID: 38847997
but the form does not submit when I click the button:

i just copied your code and accessed the page, i am redirected to paypal results, i mean the page is submitting on click of the image.

can u give more detail?

also, i would recommend using Sandbox first, then later after everything get succeeded, u can move to live paypal. so try creating sandbox hosted button first, then change the url to "https://www.sandbox.paypal.com/us/cgi-bin/webscr" and then test everything..
0
 

Author Closing Comment

by:DanielAttard
ID: 38900526
Thanks for the suggestion to use the sandbox mode.  This helped me solve the problem.  Thanks.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Boolean 13 49
What kind of script/language created this graph? 6 65
Javascript question 8 44
I'm looking for a dynamic length jQuery/javascript currency editor mask? 2 62
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question