Search the Community
Showing results for tags 'paypal'.
Found 4 results
bolossis posted a topic in GeneralHi, i try to use paypals IPN (Instant Payment Notification) I have a paypal express checkout button on my form and after a successfully payment paypal send me a confirmation. Its works ok i also get success from paypal side (IPN was sent and the handshake was verified.) The problem is that i can't get the request text that paypal send to me. I will use the request text on a memo in my session. Have somebody any idea how to make this? i use TIdHTTPServer, TIdHTTPand TIdSSLIOHandlerSocketOpenSSL places on the UniServerModule form with following settings object IdHTTPServer1: TIdHTTPServer Active = True Bindings = <> DefaultPort = 82 AutoStartSession = True OnCommandGet = IdHTTPServer1CommandGet Left = 60 Top = 80 end object http1: TIdHTTP IOHandler = OpenSSL AllowCookies = True ProxyParams.BasicAuthentication = False ProxyParams.ProxyPort = 0 Request.ContentLength = -1 Request.Accept = 'text/html, */*' Request.BasicAuthentication = False Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)' HTTPOptions =  Left = 175 Top = 80 end object OpenSSL: TIdSSLIOHandlerSocketOpenSSL MaxLineAction = maException Port = 0 DefaultPort = 0 SSLOptions.Method = sslvSSLv23 SSLOptions.Mode = sslmClient SSLOptions.VerifyMode =  SSLOptions.VerifyDepth = 0 Left = 215 Top = 140 end and the code i use is procedure TUniServerModule.IdHTTPServer1CommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo); var strWrite : TStringList; strRead : String; begin strWrite := TStringList.Create; try strWrite.Add(ARequestInfo.FormParams+'&cmd=_notify-validate'); IdHTTP1.Request.UserAgent := 'application/x-www-form-urlencoded'; IdHTTP1.ReadTimeout := 0; IdHTTP1.IOHandler := OpenSSL; strRead := IdHTTP1.Post('https://www.paypal.com/cgi-bin/webscr', strWrite); // If you are in live //strRead := IdHTTP1.Post('https://www.sandbox.paypal.com/cgi-bin/webscr', strWrite); // If you are in sandbox TThread.Synchronize(nil, procedure begin MainForm.UniMemo1.Lines.LoadFromStream(ARequestInfo.PostStream); //not works :-) //or MainForm.UniMemo2.text := strRead; MainForm.UniMemo2.Lines.SaveToFile(Uniservermodule.FilesFolderPath + 'test.txt'); //not works :-) end); except on E: Exception do begin showmessage('Error encountered during POST: ' + E.Message); end; end; strWrite.Free; end; Any Suggestion on how to print out the ARequestInfo informations??? Thanks
I want share the project sample The project show how do a basic shopping cart, and do payments with paypal (direct credit cards payment only allowed in US). Paypal, and credit card payment integrated (REST API) , only basic functions, please do not ask me about other paypal functionalities, there are a lot of information in paypal home page. The same unigui application catch the paypal response and update in database the status payment of the order (transactions table). Proyect Requierements - Paypal account / sandbox. - Firebird 2.5 Server - ZeosLib (http://ZeosLib.Sourceforge.net) - Rest - API Libraries (https://github.com/fabriciocolombo/delphi-rest-client-api) - OpenSSL Dlls (libeay32.dll and ssleay32.dll) - XE2 and UP. Open database (\files\pub.fdb), open table 'config' and change the fields with your own config PAYPAL_CLIENTID PAYPAL_SECRET DOMAIN_NAME Can test on. http://docjones.ddns.net:8077 can pay using next paypal sandbox account email@example.com password chocolate PAYPALSAMPLE.zip
Hello, Has any one used Paypal as payment gateway with UniGui Application? The requirement is that user will be able to pay via Paypal, and the Unigui application should redirect to paypal page, then know if the transactions has successfully done or not. I see TMS cloud pack has paypal component, but I didn't know if we can rely on it for this work?