This is a migrated thread and some comments may be shown as answers.

redirect to payment gateway from within RadAjaxPanel

5 Answers 107 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Emmett Bonavero-Miller
Top achievements
Rank 1
Emmett Bonavero-Miller asked on 12 May 2010, 05:21 PM

I'm using a radtabstrip and radmultipage to move a user through a complex form and get payment at end (using sagepay/protx). I tried using Response.Redirect/RadScriptManager.Redirect/RadAjaxPanel.redirect - also IFRAME and RadWindows but none of these approaches worked because of potential security issues.

The fix was wrapping this line of code within the server side event click - and then double-clicking on the button to execute javascript.

 

btnMakePayment.Attributes.Add(

 

"onClick", string.Format("window.open('{0}', '{1}');return false;", response.NextURL, "winSagepay"));

radwin.open would fail (see a response from teh telerik team), the radwindow uses IFRAME (see another response from telerik team) - and the rest don't work. They did work under some circumstances (in a dev environment) but not when I put the code on a test box.

 

 

This is a HACK - I would love to hear how others have approached this problem.

5 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 14 May 2010, 12:02 PM
Hello Emmett,

Could you please elaborate on what are the problems you are facing with the RadAjaxPanel.Redirect() method and why using RadWindow in your case did not work?
 Any additional information on your scenario and what you are trying to achieve would help us in finding a proper resolution for your case.

All the best,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Emmett Bonavero-Miller
Top achievements
Rank 1
answered on 14 May 2010, 12:19 PM
for some reason the RadAjaxPanel.redirect returned the entire web page it was meant to redirect to. And using IFrames won't work for passing off control to a payment gateway.
0
Iana Tsolova
Telerik team
answered on 14 May 2010, 01:42 PM
Hi Emmett,

With the Redirect methods, either the Response.Redirect or the RadAjaxPanel.Redirect, the page specified as argument is loaded and full postback is performed. Could you please confirm this is not the desired result in your case? If yes, I assume you want to update specific page content or show an informational popup, right? 

Best wishes,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Emmett Bonavero-Miller
Top achievements
Rank 1
answered on 14 May 2010, 01:58 PM
Hello Iana - I'm posting form fields to a payment gateway. From there the user can enter their credit card details. the xmlHttpRequest responseText's value is the web page that I was hoping I could redirect to. I've attached an image of what the returned responseText value looks like in a browser.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Timestamp: Fri, 14 May 2010 12:43:55 UTC

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<!DOCTYPE html
  PUB'.
Line: 6
Char: 62099
Code: 0
URI: http://localhost:6667/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.309.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a30afb63f-e6ac-41db-9851-11879733de0a%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a6a6d718d%3a4cacbc31%3ab7778d6c%3ac08e9f8a%3a874f8ea2%3a19620875%3a39040b5c%3aa51ee93e%3a59462f1%3addbfcb67%3a8674cba1

 

0
Iana Tsolova
Telerik team
answered on 14 May 2010, 02:33 PM
Hi Emmett,

I am afriad I am still not sure what you are trying to achieve. Can you send us a sample project illustrating your scenario and the error?

Best wishes,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
Emmett Bonavero-Miller
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Emmett Bonavero-Miller
Top achievements
Rank 1
Share this question
or