Solved

How to Integrate PayPal Payment in my website

Posted on 2011-02-23
2
839 Views
Last Modified: 2012-05-11
I need to open a Paypal payment form from my web page.

Then I need to be redirected from PayPal back to the page that called the Paypal payment form.

I need the PayPal response information to determine if the payment was accepted.

I use the RegisterExpired.aspx.cs form to call the PayPal payment form

 protected void cmdRenew_Click(object sender, EventArgs e)
    {
        //try
        // {
            //Response.Redirect("~/PaymentForm.htm");
            Response.Redirect("~/Payment.aspx");
        //PaymentForm.htm
            //return "Process OK";
        //}

I am confused. Should I be calling the htm or the aspx?

PaymentForm.htm

<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="4078972"/>
<table>
<tr><td><input type="hidden" name="on0" value="You will have a choice of paying by PayPal"/>
You will have a choice of paying by PayPal</td>
</tr><tr><td>
<input type="hidden" name="os0" /></td></tr>
<tr><td><input type="hidden" name="on1" value="or paying by credit card"/>
or paying by credit card</td></tr><tr><td>
<input type="hidden" name="os1" /></td></tr>
</table>
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif"
name="submit" alt="PayPal - The safer, easier way to pay online!"/>
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"/>
</form>

This goes to PayPal. https://www.paypal.com/cgi-bin/webscr

However when I click the Cancel and Return to David Martin LLC

I get the following error.
Internet Explorer cannot display the webpage

https://www.paypal.com/us/cgi-bin/webscr?SESSION=Fp48FD7EYx4ksmO8uGknmvELGByCJ38geoXcdjtq_My56C0mke6gH8m8aE0&dispatch=5885d80a13c0db1f8e263663d3faee8d61ec37c409b56235bed2ddf64505aee9

Can you refer me to documentation that explains the process?

Thanks,

0
Comment
Question by:Dovberman
2 Comments
 
LVL 4

Accepted Solution

by:
racastillojr earned 500 total points
ID: 34967267
When you create the paypal button, there is a section that asks you to put the url you want the user to be redirected to if they cancel the order. They also have a section that ask your for the url after they pay.

Those options are located in "step 3 Customize advanced features (optional)"  of the Create Paypal payment button".

So for example, if you select Merchant service, the you try to create the buy now button, you will see those options at the bottom of the page.
0
 

Author Closing Comment

by:Dovberman
ID: 34969971
Thanks,
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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