FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Shell.Explorer.2 problem
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Shell.Explorer.2 problem
Posted: Mon Jun 26, 2023 10:05 PM

All,

I've been using the following code for years to access a website for credit card processing. This function displays a window and allows the user to enter credit card information to process a credit card and then returns the result. Now, all of a sudden when this function is called, I get "An error has occurred in the script on this page", Error: syntax error.

I suspect this has something to do with Microsoft updating Edge and ending support for ActiveX. I tried changing the settings in Edge to allow for Internet Explorer Mode with no luck.

Has anyone else seen this problem? What can I use besides ActiveX to get around this issue?

Here is my code.

FUNCTION HPCall( cTransactionSetupID, oDlg )

local oWndHP, oActiveX

local cEvents := ""

LOCAL cHtml := ""

LOCAL oIcon

DEFINE ICON oIcon RESOURCE "MYICON"

DEFINE WINDOW oWndHP ;

  FROM 1, 5 TO 40, 75 ;

  TITLE "Hosted Payments"  ;

  STYLE nOr(WS_CAPTION, WS_SYSMENU)

oActiveX = TActiveX():New( oWndHP, "Shell.Explorer.2" )

oWndHP:oClient = oActiveX // To fill the entire window surface

oActiveX:Do( "Navigate", HOSTEDPAYMENTS + "/?TransactionSetupID="+ cTransactionSetupID )

ACTIVATE WINDOW oWndHP ;

  ON INIT ( oWndHP:SetIcon( oIcon ) ) ;

  VALID ( cHtml := HPCallResults(oActiveX), .t. )

// Disable my app until this window is closed!

IF !empty(oDlg)

  oDlg:disable()

ELSE

  oWnd:disable()

ENDIF

DO WHILE empty(cHtml)

  SysRefresh()

ENDDO

IF !empty(oDlg)

  oDlg:enable()

  oDlg:SetFocus()

ELSE

  oWnd:enable()

  oWnd:SetFocus()

ENDIF

RETURN cHtml

Thanks,

Randal

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Shell.Explorer.2 problem
Posted: Mon Jun 26, 2023 10:24 PM
Try

oActivex:Silent := .T.
Code (fw): Select all Collapse
   oActivex  : Silent := .T.
Rgards, saludos
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Shell.Explorer.2 problem
Posted: Mon Jun 26, 2023 10:40 PM
Code (fw): Select all Collapse
// \SAMPLES\CMSOFT1.PRG

#Include "FiveWin.ch"

STATIC oActiveX

FUNCTION CmSoft_Web()

   LOCAL oChildWnd, cTitle

   cTitle := "FiveWin Brasil"

   MsgWait( "CONECTANDO AL FIVEWIN MUNDIAL...", ;
            "AGUARDE UM MOMENTO POR FAVOR... ", 2.0 )

   // DEFINE WINDOW oChildWnd FROM 0, 0 TO 600, 800 PIXEL TITLE cTitle
   DEFINE WINDOW oChildWnd FROM -1, -1 TO -1, -1 PIXEL

   oActiveX = TActiveX():New( oChildWnd, "Shell.Explorer.2" )

   oActivex:Silent := .T.

   oChildWnd:oClient = oActiveX

   // oActiveX:Do( "Navigate2", "http://www.fivetechsoft.com" )
   //oActiveX:Do( "Navigate2", "https://app.pedidosbcn.com/tienda/tiendadepizzas" )

   oActivex:SetFocus()

   ACTIVATE WINDOW oChildWnd MAXIMIZED ;
      ON INIT( oActiveX:Do( "Navigate2", "https://app.pedidosbcn.com/tienda/tiendadepizzas" ) )

RETURN NIL

// FIN
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Shell.Explorer.2 problem
Posted: Mon Jun 26, 2023 10:41 PM

// \SAMPLES\CMSOFT1.PRG

Include "FiveWin.ch"

STATIC oActiveX

FUNCTION CmSoft_Web()

LOCAL oChildWnd, cTitle

cTitle := "FiveWin Brasil"

MsgWait( "CONECTANDO AL FIVEWIN MUNDIAL...", ;

        "AGUARDE UM MOMENTO POR FAVOR... ", 2.0 )

// DEFINE WINDOW oChildWnd FROM 0, 0 TO 600, 800 PIXEL TITLE cTitle

DEFINE WINDOW oChildWnd FROM -1, -1 TO -1, -1 PIXEL

oActiveX = TActiveX():New( oChildWnd, "Shell.Explorer.2" )

oActivex:Silent := .T.

oChildWnd:oClient = oActiveX

// oActiveX:Do( "Navigate2", "http://www.fivetechsoft.com" )

//oActiveX:Do( "Navigate2", "https://app.pedidosbcn.com/tienda/tiendadepizzas" )

oActivex:SetFocus()

ACTIVATE WINDOW oChildWnd MAXIMIZED ;

  ON INIT( oActiveX:Do( "Navigate2", "https://app.pedidosbcn.com/tienda/tiendadepizzas" ) )

RETURN NIL

// FIN

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: Shell.Explorer.2 problem
Posted: Mon Jun 26, 2023 11:01 PM
oActiveX:Silent := .T.

Thank you for your reply. Adding this line of code causes the error message to not be displayed however, the activex window is blank.

Upon further investigation I believe the problem may be because the vendor recently added a Captcha that the user needs to respond to before proceeding. I would appear that my app is the only one experiencing a problem.

This is the url referenced in the error message.

https://certtransaction.hostedpayments.com/cdn-cgi/challenge-platform/h/g/orchestrate/managed/v1?ray=7dd8f33ca91c16be

Is there something I need to do with the activex to enable this?

Thanks,
Randal
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Shell.Explorer.2 problem
Posted: Tue Jun 27, 2023 04:20 PM

Most likely, the site that you use has stopped running under IE. Try opening it in other browsers. If it opens normally, then install the WebView and work through it.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Shell.Explorer.2 problem
Posted: Tue Jun 27, 2023 05:24 PM

Hello,

What exactly needs to be installed for WebView2?

As far as I know, since Windows 10 version 2004 (May 2020 Update), WebView2 is part of the operating system and is included by default. In such cases, you don't need to install WebView2 separately as it is already present.

What needs to be installed on older systems?

Best regards,

Otto

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Shell.Explorer.2 problem
Posted: Tue Jun 27, 2023 05:30 PM
Hello. everything indicates that this provider:

https://certtransaction.hostedpayments.com/

https://stripe.com/br/resources/more/hosted-payment-pages#:~:text=hosted%20payment%20pages-,What%20is%20a%20hosted%20payment%20page%3F,payment%20gateways%20on%20their%20websites.

Also doesn't work:
https://transaction.hostedpayments.com/mobile/

is inoperative or out of order.

Do you have their contact information to find out what happened? Email, phone? It does not open, neither in Internet Explorer nor in Google. Maybe with the WebView...

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Shell.Explorer.2 problem
Posted: Tue Jun 27, 2023 05:41 PM
https://certtransaction.elementexpress.com/express.asmx?op=CreditCardAVSOnly
Code (fw): Select all Collapse
<Response xmlns="https://transaction.elementexpress.com">
<Response>
<ExpressResponseCode>103</ExpressResponseCode>
<ExpressResponseMessage>Invalid Request</ExpressResponseMessage>
</Response>
</Response>
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Shell.Explorer.2 problem
Posted: Tue Jun 27, 2023 05:45 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: Shell.Explorer.2 problem
Posted: Tue Jun 27, 2023 05:57 PM
Thank you for all your help and suggestions.

Over the years, Element Payment Systems was bought out by Vantiv which was bought out by Worldpay. I was contacted by developers at Worldpay telling me they are receiving reports from other developers/partners that are having the same problem and are trying to get to the bottom of it.

Although the latest versions of MS Edge have support for IE, I suspect ActiveX is going to be completely obsolete soon if it is not already so upgrading to use Webview or some other technology will be necessary.

Randal
karinha wrote:This one works, but I don't know if it's the same company.

https://certtransaction.elementexpress.com/express.asmx

https://webhelp.optimizely.com/latest/en/b2b-commerce-sdk/connectorsandintegrations/paymentgateways/vantivexpress.htm

Regards, saludos.
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: Shell.Explorer.2 problem
Posted: Thu Jun 29, 2023 01:50 PM

All,

The developers at Worldpay explained that their website "uses something called ThreatMetrix as an additional security measure for verifying a person is a “person” when initiating a Hosted Payments transaction, and it seems that recently they made a change that implemented some newer javascript functionality that causes issues on older browser versions."

According to them, "a kind of a high level solution would be to look into when the DOM is loaded into the browser that is hosting the window and look for the script tag that grabs the ThreatMatrix Javascript file and remove it from the DOM before it renders the hosted payments page. Ultimately that is where the failure is occurring so it would be wherever you can implement a way to block that from happening."

Does anybody know of a way to do this using oActiveX = TActiveX():New( oWndHP, "Shell.Explorer.2" ) ?

Thanks,

Randal

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Shell.Explorer.2 problem
Posted: Thu Jun 29, 2023 04:51 PM

Dear Randal,

You may try it using WebView

Please review FWH\samples\webview.prg and webviewuni.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion