News:

Looking for documentation? Take a look on our wiki

Main Menu

ProtX

Started by Rob, September 09, 2004, 18:44:00 PM

Previous topic - Next topic

Priz

I have installed the scripts as per Chris' instruction and it works  ;D

Well nearly, "OK" transactions are processed and and marked as confirmed :D but "NOTAUTHED" and "INVALID" transations have an interesting problem.  The crypt string does not appear to be decrypted properly.  If I display the value of the 'Status' field before entering the switch statement I get strings like "NOTAjÂÅV•¸..." (approx 300 characters long).

I have tried copying and replace the relevant functions from the Protx SDK over the ones Chris provided and still no joy :(

Any advice on what I am missing would be great.  Please feel free to state the obvious, I am not new to programming but I would have to describe my PHP skills as novice.

Thanks

Priz

Iain

After what feels like years of searching, I have finally cracked the problem of some orders being passed back correctly by Protx and some not - the ones that are not go back to a blank page or simply don't update the database with the order status.

Between the Protx support section on their site and the Zen Cart forum (!!) I found the following:

If you are unable to decode the crypt string on your completion page, and are using PHP, this will be a URL encoding issue. When data is passed to our system it needs to be URL encoded, which means that spaces need to be replaced with a +. (or  %20 depending on the URL encoding used). Newer versions of PHP are removing the plusses (+) and putting the spaces back in before you run the decode routine on your completion page.
(NB: Versions of PHP that seem to have changed in the way they treat + symbols, are PHP 4.4.1 and 4.4.2. )


The solution is therefore a simple str_replace to sort out the 'crypt' part of the url sent back by Protx before decoding it. Two cautions; firstly I am in the very early stages of testing it, but I cannot currently replicate errors that routinely appeared before hacking around the code. Secondly, I'm not sure my coded solutions is syntactically the most elegant - I'm not the world's greatest PHP coder - but it does at least seem to work and that will do for me for now!

The solutions I came up with was to edit checkout.protx_cpi_result.php by inserting the following after line 61:

   $crypt=$_GET['crypt'];
   $decrypt=(str_replace(' ', '+', $crypt));

and then change the line that was at line 62:

$message_from_protx = ps_protx_cpi::simpleXor(base64_decode($_GET['crypt']),PROTX_CPI_SECRET);

to the following:

$message_from_protx = ps_protx_cpi::simpleXor(base64_decode($decrypt),PROTX_CPI_SECRET);

Hope this helps someone!




Priz

Quote from: Iain on August 10, 2006, 18:49:01 PM
Hope this helps someone!

It helped me  ;D - Thanks

Priz

Peter Clements

#78
I'm posting this just in case anyone has the same problems we had.

Firstly, thanks for this payment module – followed the instructions months ago and EVERYTHING worked first time, only took 5 minutes from start to finish.

Recently we've had complaints from a client using VM with the Protx Payment Module that he is being emailed a few times a week by customers of his who are complaining that their Protx emails are telling them that their shipping address is the same as their billing address despite the fact that they had entered and selected a shipping address different to billing address.

I've found that editing lines 304 and 306 of the "ps_protx_cpi.php" file did the trick, changing all references of "$dbbt" to "$dbst".  This will pass the selected shipping address to Protx correctly.

BE SURE to leave all other references of "$dbbt" alone (i.e. those not on lines 304 or 306) as that's stuff handling the passing of the billing information.

Hope this helps and makes sense! :)

maia

Just a quick question:

Could i use this payment module if i'm trying to implement a 3dsecure ecommerce solution ?

Thanks,
MAIA

John - Australia

Hi
does anyone know how to change the protx gererated tx code with the order numbr generated by Virtuemart

John Butler

#81
Hi,

I am building a Joomla test site for a not-for-profit personal development group in the UK. (http://yesgroup.org.uk/Joomla/)

I have been working my way through all the posts in this thread and have Protx Form working with Virtuemart 1.0.9 up to a point.  My php coding knowledge is non-existent, so I'm attempting to second guess the reasons.

I appear to have the issue referred to by gamma911 & moonbeaver in posts 55-58, 60 & 72, i.e. I get the corrrect responses on the Protx test area but when the encrypted code is sent back after successfully completing the test transaction at Protx, I get the following issue :-

A blank page with a "Page not found - The page you requested was not found on this web server." error message in response to attempting to resolve the generated link to the address "http://yesgroup.org.uk/joomla/index.php?&option=com_virtuemart&page=checkout.protx_cpi_result&crypt=...." delivered from Protx.

As I understand it, the checkout.protx_cpi_result.php file is not being found or referenced correctly by the setup file/response link to decrypt the data and process the outcome correctly within Virtuemart.  Am I correct?

As this thread has been dormant for some time, has anyone managed to resolve and get this working correctly since the last informative posts in August/September last year?

Sloop :)

baggiesmad

Ive added the three files to my site like chris and yourself have done.

Ive created a new payment, but when I click save i get this error....



Warning: fopen(/home2/smashing/public_html/administrator/components/com_virtuemart/classes/payment/ps_protx_cpi.cfg.php) [function.fopen]: failed to open stream: Permission denied in /home2/smashing/public_html/administrator/components/com_virtuemart/classes/payment/ps_protx_cpi.php on line 158


Ive also edited the "ps_protx_cpi.cfg.php" and added my password and store info.

I then tested the store out.

I added an item to my basket, selected protx payment which then confirms my order. after this, it takes me to the protx VSP simulation page on their site.

the problem is that it throws up a few problems.

Submission Errors
VSP Simulator has found the vendor 'mydomain' in the database but it is not enabled for VSP Form. If you intend to use VSP Form with this account, log into the accounts section of VSP Simulator and enable VSP Form.


Any help would be great.


Vdub

Thanks to Chris Stead I  have a fully functioning Protx payment module. After making the necessary modificaitions with the instructions provided by Chris. Testing on the vsp simulator went okay. Test transactions on the live simulator have gone okay.

So fingers crossed all will go okay. Thanks to all contibuters. Good luck to those who are installing the Protx module

Marcus

Yep, like Maia we are also looking for Protx 3D Secure integration with virtuemart 1.09 and Joomla 1.012.  Any help would be greatly appreciated.

TRIPLEdm

Can anybody help me intergrate PROTX with Virtuemart?... I have a client insisting on useing PROTX but just dont know how to do it for them.

Thank you in advance.
JC
www.tripledm.com
www.sapromo.com
"... Yesterday is History, Tomorrow is a Mystery, Today is a gift, that's why we call it Present"

TRIPLEdm

JC
www.tripledm.com
www.sapromo.com
"... Yesterday is History, Tomorrow is a Mystery, Today is a gift, that's why we call it Present"

smalcolm

Just wanted to say thanks to everyone that contributed to this thread - Ive just got protx integration working. THANKS!

my biggest stumbler was 'invalid URL' messages, then bizzarely when I was trying to checkout I was being redirected to wikipedia page on https!!!!!

The problem was that I had the CPI_REMOTE_HOST set to https://ukvpstest.protx.com when it should just be set to ukvpstest.protx.com.

After re-reading this thread, I can see that all the code have it set properly - not sure how I managed to screw it up, but if I did it, maybe you have to??

Lee Wilson

Hi there,

Has anyone successfully implemented Virtuemart 1.0.10 with Joomla 1.0.12 ?

I've followed this thread and I thought Chris Steads posts were great, however there is no ps_orders file to edit with the latest version of virtuemart.

I've also tried downloading the module from http://www.terinea.co.uk/blogs/terineatechtips/2006/10/03/protx-for-virtuemat/ but am getting all sorts of funnies.

The last resort I'm thinking of unless anyone comes back to me from here is to purchase the module from www.ecom-solutions.com, but I'm not sure that will work either - and there is no feedback on this either.

If anyone has any suggestions / pointers I would be extremely grateful.

Thanks

baggiesmad

Quote from: Lee Wilson on June 11, 2007, 14:58:56 PM
Hi there,

Has anyone successfully implemented Virtuemart 1.0.10 with Joomla 1.0.12 ?

I've followed this thread and I thought Chris Steads posts were great, however there is no ps_orders file to edit with the latest version of virtuemart.

I've also tried downloading the module from http://www.terinea.co.uk/blogs/terineatechtips/2006/10/03/protx-for-virtuemat/ but am getting all sorts of funnies.

The last resort I'm thinking of unless anyone comes back to me from here is to purchase the module from www.ecom-solutions.com, but I'm not sure that will work either - and there is no feedback on this either.

If anyone has any suggestions / pointers I would be extremely grateful.

Thanks

I have successfully implemented protx with virtuemart this week using this method and the latest version of virtuemart.