We would like change the paypal behaviour. Currently it appears that the control <uc:PayPalPayNowButton ID="PayPalPayNowButton" runat="server"></uc:PayPalPayNowButton> renders a form with <form name="PayPal_Button" action="https://www.sandbox.paypal.com/xclick/" method="post"> and all the order values. This is posted via javascript with document.PayPal_Button.submit(); in body. This is generated after the user has clicked another pay with paypal button.
We would like to remove this additional click and auto generate the values for paypal but cannot work out where the form is generated. Can you please give me some pointers to how to do this? Is there a method in the api that i have yet to locate?
Thanks very much.
How to avoid the additonal "pay with paypal" user click.
Re: How to avoid the additonal "pay with paypal" user click.
This form definition and the button click related code is returned by the provider. I think there is only one click involved. If you check the Paypal button control code then in this control there is no button at all. In fact provider provides the button information that is then injected in the placeholder.
Re: How to avoid the additonal "pay with paypal" user click.
The process of payment goes thus:-mazhar wrote:This form definition and the button click related code is returned by the provider. I think there is only one click involved. If you check the Paypal button control code then in this control there is no button at all. In fact provider provides the button information that is then injected in the placeholder.
1. Get to payment page - Options of Credit Card or Paypal via Radio button list.
2. User clicks paypal and a paypal button appears where the credit card form was previously
3. User clicks paypal button and is redirected to http://my.site/Checkout/Receipt.aspx?OrderId=143
4. User then has to click the Pay With Paypal button again.
5. User is redirected to Paypal and they pay.
6. On successfuly payment, user is redirected to http://mysite/ProcessPayPal.ashx (currently we get a null reference error on sandbox here).
This is quite a long process and i would like to do the following:-
1. Get to payment page - Options of Credit Card or Paypal via Radio button list.
2. User clicks paypal RadioButton which does autopost back (instead of the paypal button)
3. User is redirected to Paypal and they pay.
4. On successfuly payment, user is redirected to http://mysite/ProcessPayPal.ashx
Thanks very much.