Shell.Explorer.2 problem

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

Shell.Explorer.2 problem

Post by Randal »

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

Re: Shell.Explorer.2 problem

Post by karinha »

Try

oActivex:Silent := .T.

Code: Select all | Expand

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

Re: Shell.Explorer.2 problem

Post by karinha »

Code: Select all | Expand

// \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: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Shell.Explorer.2 problem

Post by karinha »

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

Re: Shell.Explorer.2 problem

Post by Randal »

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
Natter
Posts: 1226
Joined: Mon May 14, 2007 9:49 am

Re: Shell.Explorer.2 problem

Post by Natter »

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.
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Shell.Explorer.2 problem

Post by Otto »

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

Re: Shell.Explorer.2 problem

Post by karinha »

Hello. everything indicates that this provider:

https://certtransaction.hostedpayments.com/

https://stripe.com/br/resources/more/ho ... 0websites.

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: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Shell.Explorer.2 problem

Post by karinha »

https://certtransaction.elementexpress. ... ardAVSOnly

Code: Select all | Expand

<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: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Shell.Explorer.2 problem

Post by karinha »

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/e ... xpress.htm

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Randal
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Shell.Explorer.2 problem

Post by Randal »

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/e ... xpress.htm

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

Re: Shell.Explorer.2 problem

Post by Randal »

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
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Shell.Explorer.2 problem

Post by Antonio Linares »

Dear Randal,

You may try it using WebView

Please review FWH\samples\webview.prg and webviewuni.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply