Statistics: Posted by susmita2111 — 22 Dec 2020 06:00
Statistics: Posted by chrixtusspater — 15 Aug 2020 15:01
Statistics: Posted by Fozzy — 18 Jul 2020 08:51
Statistics: Posted by zsleo — 23 Jun 2020 20:16
Statistics: Posted by lucas21 — 10 Feb 2020 13:27
scoluccia wrote:
Hi
if I write your code I get "webapplication.isCallBack must be False Error!"
it works only if I write:
if CGIsCallBackProcessing then CGCallBackEnableAjaxResponse;
instead of
if pContainer.OwnerForm.WebApplication.CallBackProcessing then CGCallBackEnableAjaxResponse;
Statistics: Posted by Alexander Bulei — 21 Apr 2016 09:43
Statistics: Posted by scoluccia — 20 Apr 2016 23:19
Statistics: Posted by Alexander Bulei — 26 Feb 2016 10:00
Statistics: Posted by cleversonviana — 25 Feb 2016 20:08
Statistics: Posted by eosventas — 01 Feb 2015 17:58
Statistics: Posted by Jorge Sousa — 27 Mar 2014 00:35
Statistics: Posted by zsleo — 26 Mar 2014 23:22
Statistics: Posted by Jorge Sousa — 20 Mar 2014 20:11
{instantiate content handler for PayPal auto-return URL as setup in PayPal merchant account}
with THandlers.Add(EmptyStr, 'transaction.html', TContentForm.Create(TformPDT_TX)) do
CanStartSession := False;
procedure TformPDT_TX.IWAppFormCreate(Sender: TObject);
var
S, R: TStringList;
M: TStream;
begin
if (WebApplication.Request.QueryFields.IndexOfName('tx') > -1) then begin
R := TStringList.Create;
try
S := TStringList.Create;
M := TMemoryStream.Create;
try
S.Add('cmd=_notify-synch');
S.Add('tx=' + WebApplication.Request.QueryFields.Values['tx']);
S.Add('at=' + 'Your PayPal PDT ID');
IdHTTP.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
IdHTTP.Request.ContentType := 'application/x-www-form-urlencoded';
IdHTTP.Post('https://www.sandbox.paypal.com/cgi-bin/webscr', S, M); // sandbox for testing only, remove for live transactions
M.Position := 0;
S.LoadFromStream(M);
R.AddStrings(S);
finally
FreeAndNil(S);
FreeAndNil(M);
end;
if (idHTTP.ResponseCode = 200) and (R[0] = 'SUCCESS') then begin
// display as required
lablTXNID.Caption := R.Values['txn_id'];
IWCGJQLabel2.Caption := Format('Item: %s', [AnsiReplaceStr(R.Values['item_name1'], '+', ' ')]);
// and whatever else you want to display
end else
WebApplication.ShowMessage('PayPal Payment Data Transfer failed, please check your PayPal Account to verify transaction has been completed.');
finally
FreeAndNil(R);
end;
end else
WebApplication.ShowMessage('Unable to obtain transaction information from PayPal.');
end;
Statistics: Posted by Peter_B — 20 Mar 2014 19:47