How to avoid the additonal "pay with paypal" user click.

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
moopa
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue May 13, 2008 10:11 am

How to avoid the additonal "pay with paypal" user click.

Post by moopa » Fri Oct 31, 2008 6:05 am

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.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: How to avoid the additonal "pay with paypal" user click.

Post by mazhar » Fri Oct 31, 2008 6:22 am

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.

User avatar
moopa
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue May 13, 2008 10:11 am

Re: How to avoid the additonal "pay with paypal" user click.

Post by moopa » Fri Oct 31, 2008 6:44 am

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.
The process of payment goes thus:-

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.

Post Reply