| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 1546 online users. » 0 Member(s) | 1543 Guest(s) Applebot, Bing, Google
|
| Latest Threads |
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: MJS@mjs.us
09-11-2026, 09:49 PM
» Replies: 1
» Views: 212
|
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 166
|
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-08-2026, 01:48 AM
» Replies: 0
» Views: 180
|
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 487
|
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 251
|
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 656
|
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 230
|
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,259
|
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 368
|
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 995
|
|
|
| HTTP/TCPServer Intercept |
|
Posted by: kbriggs - 05-05-2022, 05:33 PM - Forum: Indy
- Replies (1)
|
 |
I'm setting up intercepts like this in my OnConnect events to track total bytes coming in and going out:
Code: AContext.Connection.Intercept := TIdConnectionIntercept.Create(AContext.Connection); // track total bytes in and out
AContext.Connection.Intercept.OnReceive := InterceptEvents.OnReceive;
AContext.Connection.Intercept.OnSend := InterceptEvents.OnSend;
Do I need to call AContext.Connection.Intercept.Free in the OnDisconnect event or does that get cleaned up automatically when the connection ends?
|
|
|
| TIWModalWindow |
|
Posted by: Lorbass - 05-05-2022, 08:33 AM - Forum: IntraWeb General Discussion
- Replies (5)
|
 |
Hi @all
Is it possible to open two modal windows nested?
Scenario:
The main page (TIWAppForm) contains a button to open a modal window (dialog 1).
In this modal window is another button to open another modal window (dialog 2).
Both modal windows should be visible.
What is the trick or is it not possible?
Thanks in advance for an appropriate answer!
|
|
|
| Paypal JS SDK API |
|
Posted by: Anto90 - 05-04-2022, 03:52 PM - Forum: IntraWeb General Discussion
- Replies (4)
|
 |
Hi at all,
i have integrated paypal javascript api in intraweb and this is the code on OnApprove Payment
onApprove: function(data, actions) { ' + sLineBreak +
' $.busyLoadSetup({ fontawesome: "fa fa-spinner fa-spin fa-5x fa-fw" }); $.busyLoadFull("show"); ' + sLineBreak +
' return actions.order.capture().then(function(orderData) { ' + sLineBreak +
' // dettaglio di risposta ' + sLineBreak +
' addHiddenInput("JSONRESPONSE",JSON.stringify(orderData, null, 2)); ' + sLineBreak +
' ajaxCall("JsonPayPalResponse","&TipoAbbonamento='+ TipoAbbonamento.ToString +'",false); //abbonamento personale ' + sLineBreak +
' }); ' + sLineBreak +
' }, ' + sLineBreak +
(AggiungiLog add log a table to get state of payment)
I use an hidden input to capture json and then i pass it to callback.
I use 2 callback 1 is
procedure TBSNuovoPagamentoPaypalForm.JsonPayPalResponse(EventParams: TStringList);
var
js : string;
TipoAbb : string;
dm : TMod1;
jsCall : string;
begin
TipoAbb := EventParams.Values['TipoAbbonamento'];
//salvo il log della response
js := Format('addHiddenInput("%s",%s);', ['JSONTOELAB', 'document.getElementsByName("JSONRESPONSE")[0].value']);
jsCall := ' ajaxCall("ElaboraPagamentiDaJson","&TipoAbbonamento='+TipoAbb+'",false);';
js := js + jsCall;
//cambiato su un'unica chiamata
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(js);
end;
and the other is to get the hidden input value
procedure TBSNuovoPagamentoPaypalForm.ElaboraPagamentiDaJson(EventParams: TStringList);
var
JSonProcess : string;
TipoPagamento : string;
JSonObject : TJSONObject;
JSonValueCompleted : TJSonValue;
JSonValueId : TJSonValue;
Abbonamento : string;
dm : TMod1;
begin
JSonProcess := EventParams.Values['JSONTOELAB'];
TipoPagamento := EventParams.Values['TipoAbbonamento'];
JSonObject := nil;
dm := LockDataModule();
try
dm.AggiungiLog('Risposta json server paypal',Copy(JSonProcess,1,3000));
JSonObject := TJSONObject.ParseJSONValue(TEncoding.UTF8.GetBytes(JSonProcess), 0) as TJSONObject;
if JSonObject = nil then
begin
WebApplication.ShowMessage('Errore nella decodifica di risposta del server Paypal.com');
dm.AggiungiLog('Errore decodifica json paypal','ElaboraPagamentiDaJson JSonObject nil');
Exit;
end;
JSonValueCompleted := JSonObject.GetValue('status');
JSonValueId := JSonObject.GetValue('id');
if (UpperCase(JSonValueCompleted.Value) = 'COMPLETED') and (JSonValueId.Value <> '') then
begin
//pagamento completato e posso procedere con generazione fattura e abilitazione utente
IWTimer1.ExtraTagParams.AddPair('TipoAbbonamento',TipoPagamento);
IWTimer1.ExtraTagParams.AddPair('IDPAGAMENTO',JSonValueId.Value);
if TipoPagamento = CODABBINPS.ToString then //per abbonamento comunicazioni inps.
IWTimer1.ExtraTagParams.AddPair('Datore',CodDatore.ToString);
BSDialogoAttesa.ModalVisible := True;
IWTimer1.Enabled := True;
end;
finally
if Assigned(JSonObject) then
JSonObject.Free;
UnlockDataModule(dm);
WebApplication.CallBackResponse.AddJavaScriptToExecute('$.busyLoadFull("hide");');
end;
end;
with JavaScript do // creo hidden input per il ritorno del valore funzione javascript
begin
Add('function addHiddenInput(aName,aValue) {');
Add(' var frm = $(getSubmitForm());');
Add(' if (!frm.length) return false;');
Add(' var hid = frm.find("input[name=\"" + aName + "\"]");');
Add(' if (!hid.length) {');
Add(' hid = $("<input type=\"hidden\" name =\"" + aName + "\">");');
Add(' frm.append(hid);');
Add(' }');
Add(' hid.val(aValue);');
Add(' AddChangedControl(aName);');
Add('}');
Add('');
end;
Then the timer excute code to activate the service to user with a busy modal dialog
Sometimes callback JsonPayPalResponse does not fire. In paypal i have the payment in status complete and response ok but in the OnApprove can't fire the callback to activate the service for the user.
In sandbox and test case i can't reproduce the issue but some user can't activate. I open a ticket on paypal and the order is correctly captured with json response ok.
The calls to paypal are javascript based on documentation that you can find here https://developer.paypal.com/sdk/js/configuration/
Is the right way to process jSon that come from paypal onApprove callback?
Thank you
Andrea
|
|
|
| IWjQDBGrid column auto width |
|
Posted by: Comograma - 05-02-2022, 04:52 PM - Forum: IntraWeb General Discussion
- Replies (3)
|
 |
I have a IWjQDBGrid component with goAutoGridWidth and goAutoColumnWidth set to True but this doesn't work.
How can I put this to work? Either I have a column with 2 or 3 characters and a column too large or a string with several characters that do wrap when it shouldn't, because too much width is wasted with the short column.
|
|
|
| Form background color |
|
Posted by: Comograma - 05-02-2022, 11:15 AM - Forum: IntraWeb General Discussion
- Replies (1)
|
 |
How can I change/set the form's background color?
If I change Form.BGColor to anything, it doesn't do nothing.
I know I can set a region's BSBackground to something different than bsrbDefault and it will change the color, but not the hole background color for parent form, height, at least.
How can I do this?
|
|
|
| Indy 10 version of IdPeerThread.stop |
|
Posted by: dataspiller - 04-28-2022, 10:31 PM - Forum: Indy
- Replies (3)
|
 |
Good afternoon
I'm in the process of updating an old delphi program to run on Delphi 10.4 - it uses an old version of Indy - thinking at least indy 8.
I have been able to find resources on most of the changes needed to be made to make it work with indy 10.
Except so far one.
IdPeerThread.Stop - I know IdPeerThread has been replaced with IdContext.
But I don't know what IdPeerThread.Stop does to know what procedure to IdContext replaced it with.
I have tried finding the source code, getting hold of indy 9 documentation hoping it would cover the changes.
Any tips?
Thanks,
Seth
|
|
|
|