Shell.Explorer.2 problem

Shell.Explorer.2 problem

Postby Randal » 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
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Shell.Explorer.2 problem

Postby karinha » Mon Jun 26, 2023 10:24 pm

Try

oActivex:Silent := .T.

Code: Select all  Expand view  RUN

   oActivex  : Silent := .T.
 


Rgards, saludos
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Shell.Explorer.2 problem

Postby karinha » Mon Jun 26, 2023 10:40 pm

Code: Select all  Expand view  RUN

// \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
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Shell.Explorer.2 problem

Postby karinha » 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
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Shell.Explorer.2 problem

Postby Randal » 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. ... 3ca91c16be

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

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Shell.Explorer.2 problem

Postby Natter » Tue Jun 27, 2023 4: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.
Natter
 
Posts: 1222
Joined: Mon May 14, 2007 9:49 am

Re: Shell.Explorer.2 problem

Postby Otto » Tue Jun 27, 2023 5: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6335
Joined: Fri Oct 07, 2005 7:07 pm

Re: Shell.Explorer.2 problem

Postby karinha » Tue Jun 27, 2023 5: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
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Shell.Explorer.2 problem

Postby karinha » Tue Jun 27, 2023 5:41 pm

https://certtransaction.elementexpress.com/express.asmx?op=CreditCardAVSOnly

Code: Select all  Expand view  RUN

<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
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Shell.Explorer.2 problem

Postby karinha » Tue Jun 27, 2023 5:45 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Shell.Explorer.2 problem

Postby Randal » Tue Jun 27, 2023 5: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

Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Shell.Explorer.2 problem

Postby Randal » Thu Jun 29, 2023 1: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
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Shell.Explorer.2 problem

Postby Antonio Linares » Thu Jun 29, 2023 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests