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

3cellhosting

Getting there slowly!

I have added the files, created the payment option, edited the config file, and I am getting an error as shown below...

Warning - Division by zero in /administrator/components/com_virtuemart/classes/payment/ps_protx_cpi.php on line 191

Any ideas please?

Regards

David

jcaan

Hi. Ive followed Jaddi01's instructions for SagePay_VSP payment gateway, but the following errors occur:

In the payment method form configuration in the backend of virtuemart (Im using J1.154 & VM 1.1.4) I cannot modify the settings.

This is what I get ( I haven't listed all the values):

<? echo PROTX_CPI_VPSProtocol ?>  The VPS Protocol version. Currently 2.23
<? echo PROTX_CPI_STORE_ID ?> The name of your store. Usually the same as your organisation.
<? echo PROTX_CPI_SECRET ?> The "Encryption Password" you get from protx.

Everytime I make changes to ps_protx_cpi.cfg it gets overwritten when I save the payment method form the saved ps_protx_cpi.cfg gets replaced with the <? echo's as above.

Please can someone help me. Many thanks.

stinga

#167
G'day all,

I have installed and configured but it never shows up as a payment option in checkout, not sure what is wrong yet.

Edit...
Doh!, I was looking at the wrong site!
It does show up, I just now need to configure and test.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

craftyweb

Thanks for this payment module, got it set up fine and connecting to Sage Pay but when the shopper is returned to my site, from Sage Pay, there is an error.

I've followed the instructions in the notes of jaddi01's zip file but I get an error stating that the server couldn't find the file 'protx_functions.php' in the 'includes' folder (the instructions don't to add a file here though) line 32 of 'checkout.protx_cpi_result.php'.

If I move the 'protx_functions.php' file to the includes folder in which it expects to find it I then get the following error:

Fatal error: Call to undefined function SimpleXor() in /homepages/[edited-for-security]/administrator/components/com_virtuemart/html/checkout.protx_cpi_result.php on line 69

Also in the notes in the zip file it states to upload:
/administrator/components/com_virtuemart/html/functions.php

as there is no functions.php file in the zip I presume that this is the 'protx_functions.php' file correct, or am I missing a file?

Thanks in advance, any advice much appreciated.

Jon
Joomla: 2.5.20
VirtueMart 2.0.26d

stinga

G'day,

Yes there is a naming foobar, I called mine protx_functions since that is what the code wanted, but in the zip file it is called functions.
I just had a look at my includes dirctory and I don't have a functions.php in there so you *might* not have over written anything.
(I tend to check all this stuff before I go and blindly do what what it says to do!)
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

craftyweb

stinga, so what folder do you have the 'protx_functions.php' file in?

When I place it in the html folder that the notes file specifies I get a 'file not found' error and if I put it in the includes folder the file seems to be included but I still get an error stating that the SimpleXor() function is undefined.

I can't understand how any one has got this working!

Thanks
Joomla: 2.5.20
VirtueMart 2.0.26d

bobbie_bobster

Quote from: jaddi01 on May 18, 2009, 15:58:41 PM
Shipping info is now being passed on to SagePay.  I figured it out this morning, and then ironically read a post from Peter Clements in this thread detailing the same fix!  Anyway, all seems to be working well.  All I need to do now is change the references displayed to SagePay and not Protx and continue tweaking the confirmation emails with the help of the aforementioned thread.

I'll change the headers on the files to make them work natively with Joomla 1.5 when I'm happy that it is 100%.

*EDIT*

Finished.  Joomla 1.5 Native, Virtuemart 1.1.3, SagePay VSP.

Download Here:
For US billing addresses, Sage wants the state as part of the transaction record, which in the version referenced by this quoted post wasn't being included.

The solution is to add into ps_protx_cpi.php the following code:
(a)At line 330
$delivery_country = substr($dbst->f('country'),0,2);
    if( $delivery_country == "US" )
    {
    $temp.='DeliveryState='.substr($dbst->f('state'),0,2);
    $temp.='&';
    }
(b) At the new line 352 after adding this previous code in
$billing_country = substr($dbbt->f('country'),0,2);
    if( $billing_country == "US" )
    {
    $temp.='BillingState='.substr($dbbt->f('state'),0,2);
    $temp.='&';
    }

Tested with Sage and doesn't return any MALFORMED errors.

Christopher

#172
Hi there

I'm using J1.5.15 / VM 1.1.4 and Sagepay VSP

I have got the SagePay (Protx) interface working, processing transactions in test mode and firing off the emails but Sagepay sends the customer back to a page with the following:

Direct Access to this location is not allowed.

I've seen various posts throughout this thread offering several fixes, mostly related to the location of the language files but nothing seems to work - any help would be greatly appreciated - I'm getting close to tearing my hair out now!

Update: Have found the fault in the 'checkout.protx_cpi_result.php' page by rolling back to an earlier version before I'd tinkered with it!!

Thanks
There are 10 types of people in the world:
Those who understand binary and those who don't

taralbu

Thank you so much jaddi01 for his module - I'd like to PayPal you a pint if I may!

The module worked fine; however a missing page error was generated upon returning to the site.  I had a look at checkout.protx_cpi_result.php and line 38 read:
include "$mosConfig_absolute_path/includes/protx_functions.php";

After uploading that file to that location, it worked.

Could I therefore suggest that you amend notes.txt to list the upload files as:

/administrator/components/com_virtuemart/html/checkout.protx_cpi_result.php
/administrator/components/com_virtuemart/html/protx_functions.php
/administrator/components/com_virtuemart/classes/payment/ps_protx_cpi.php
/administrator/components/com_virtuemart/classes/payment/ps_protx_cpi.cfg.php
/includes/protx_functions.php


Or maybe a recode of line 38 would work too?  I haven't tried it myself.

Anyway, thanks once again!

3cellhosting

Quote from: bobbie_bobster on October 29, 2009, 20:55:41 PM
For US billing addresses, Sage wants the state as part of the transaction record, which in the version referenced by this quoted post wasn't being included.

The solution is to add into ps_protx_cpi.php the following code:
(a)At line 330
$delivery_country = substr($dbst->f('country'),0,2);
    if( $delivery_country == "US" )
    {
    $temp.='DeliveryState='.substr($dbst->f('state'),0,2);
    $temp.='&';
    }
(b) At the new line 352 after adding this previous code in
$billing_country = substr($dbbt->f('country'),0,2);
    if( $billing_country == "US" )
    {
    $temp.='BillingState='.substr($dbbt->f('state'),0,2);
    $temp.='&';
    }

Tested with Sage and doesn't return any MALFORMED errors.

Can you confirm if this is inserted at line 330 or does it replace another line? I have attached the code in the file I downloaded. This shows lines 326 to 332 inclusive.
    $temp.='DeliveryCountry='.substr($dbst->f('country'),0,2);
    $temp.='&';
    $temp.='DeliveryPostCode='.substr($dbst->f('zip'),0,20);
    $temp.='&';
    $temp.='DeliveryPhone='.substr($dbst->f('phone_1'),0,20);
    $temp.='&';
    $temp.='BillingFirstNames='.substr($dbbt->f('first_name'),0,30);

This is the only thing holding us up now. It has been working great for UK customers but we are now getting customers from the US.

Thanks jaddi01 for a great fix.

Regards

David

baggiesmad

Does SagePay form work ok on virtuemart?

Jason Farmer

yes, yes it does...

but there are a couple of hoops to jump through...

two I've found

protx_functions.php uses short tags ie <? rather than <?php which you may need to change dependant on your php settings...

the SimpleXor function in protx_functions.php is misspelt... it should be called simpleXor

[tr][td][/td][td]
Development[/td][td]Production[/td][/tr]
[tr][td]VirtueMart   [/td][td]
2.0.12b
[/td][td]
1.1.3
[/td][/tr]
[tr][td]Joomla!   [/td][td]
2.5.6
[/td][td]
1.5.14
[/td][/tr]
[tr][td]Mysql  [/td][td]
5.5.8
[/td][td]
5.0.51
[/td][/tr]
[tr][td]PhP   [/td][td]
5.3.5
[/td][td]
5.2.4
[/td][/tr]
[/table]

tradebox

Hi, I came across this thread looking for SagePay Form Integration, I've reviewed the thread for about 2 hours now but every time I get the same error message from SagePay:

Form Transaction Error


This transaction attempt has failed. We are unable to redirect you back to the web store from which you were purchasing. The details of the failure are given below.

Status:    INVALID

Status Detail:    5005 : The Vendor configuration is missing or invalid.

Copyright Sage Pay 2010

The other worrying thing is my order still goes through as paid :O

craftyweb

SagePay customer support are very helpful with error messages. Give them a call if you haven't fixed this yet.
Joomla: 2.5.20
VirtueMart 2.0.26d

baggiesmad

Hi

I have a website running Joomla v.1.0.15 Stable & Virtuemart v1.0.15

Now that Protx has changed to SagePay, what files do i use to get SagePay running on my website?

thanks