CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Post and redirect to an URL

by eosventas » 04 Mar 2015 05:31

I am programming 2Checkout payments

I have my Delphi aplication with Intraweb and CGDevTools

I know how to use Indy to post to a URL the neccesary information, BUT I need to redirect the user to the 2Checkout site

Is there something like :

Code: Select all
WebApplication.GoToURL('http://www.2Checkout.com',POSTDATA);


I also have tried a <form method="post"> and works great the problem is that I have to prepare my database and stuff with a Delphi button, and this HTML aproach does not allow me to make my stuff

I have to do somehting like this

Code: Select all
procedure OnButtonClick
begin
    PrepareDatabase;
    Prepare internalInfo
    WebApplication.GoToURL('http://www.2Checkout.com',POSTDATA);
end;


But of course the POSTDATA is not part of the GoToURL method, that's exactly what I'm looking for, how to post AND redirect the user to 2Checkout.com
eosventas
 
Posts: 7
Joined: 01 Feb 2015 09:55

by Alexander Bulei » 04 Mar 2015 11:06

Hi eosventas,

I also have tried a <form method="post"> and works great the problem is that I have to prepare my database and stuff with a Delphi button, and this HTML aproach does not allow me to make my stuff


Yes, you can use <form> to make post, by using our IWCGJQHTMLSnippet component,
then you can trigger the form submit on IWCGJQButton.

WebApplication.GoToURL('http://www.2Checkout.com',POSTDATA);


Unfortunately, there is no direct method....

You can serialize your data to a query string that could be sent to a server in url.

Example:

Code: Select all
http://www.2Checkout.com?param1=key1&param2=key2...


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to General

cron

Who is online

Users browsing this forum: No registered users and 9 guests

Contact Us.