Skip to main content

Sage Pay does not work

More
11 years 11 months ago #177679 by Head
Sage Pay does not work was created by Head
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.6
-- Browser(s) name and version -- : Any

Hi.

I got several errors from Sage Pay when I try to pay via the plugin.

Sage Pay says either (if more than one article in the cart):

INVALID - 3021 : The Basket format is invalid.

or (if only one article is in the cart):

INVALID - 3195 : The line item amount details do not add up correctly.


The Plugin is currently in testing mode, you can have a look at the demo site. Just let me know if you need any further informations or logins. Thank you.

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #177682 by Jerome
Replied by Jerome on topic Sage Pay does not work
Hi,

Can you please activate the debug mode in the plugin ?
So we will be able to see the content send by the plugin to the SagePay platform.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #177940 by Head
Replied by Head on topic Sage Pay does not work
Hi Jerome,

the debug mode was allready enabled. When I click on "view protocol" in the configuration it says the protocol file is empty.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #177943 by Jerome
Replied by Jerome on topic Sage Pay does not work
Hi,

What "view protocol" ? I am sorry but I don't know what you are talking about.
Please edit the file "plugins/hikashoppayment/sagepay/sagepay.php" and replace
Code:
if($this->payment_params->debug) { print_r($postData,true)."\n\n\n"; }
By
Code:
if($this->payment_params->debug) { print_r($postData)."\n\n\n"; }
It will help to display the debug data when the debug mode is activated in the plugin.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #177975 by Head
Replied by Head on topic Sage Pay does not work
I use the Backend in German, so I do not know the original label of the link.

I'v allready edited that lines to:
Code:
if($this->payment_params->debug) { header('Content-Type: text/html; charset=UTF-8'); // print_r($postData,true)."\n\n\n"; echo $postData; die(); }

I do an echo there, because $postData is not an Array. You can do another order in the demo shop.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago - 11 years 10 months ago #177983 by Jerome
Replied by Jerome on topic Sage Pay does not work
Hi,

Thanks !
Can you please replace the line
Code:
'<description>'.$product->order_product_name.'</description>'.
By
Code:
'<description>'.strip_tags($product->order_product_name).'</description>'.
It should fix the issue.

It you have still problems with the "SagePay basket XML" ; you can replace the line
Code:
$postData['BasketXML'] = $bxml;
By
Code:
// $postData['BasketXML'] = $bxml;
To avoid the addition of the basket in the content.
I added an option for the next build, so it will be possible to activate or deactivate the basket.
We will processed some new tests, I guess that some tests where missing with the variants :)

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 11 years 10 months ago by Jerome.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago - 11 years 10 months ago #177994 by Head
Replied by Head on topic Sage Pay does not work
Hi Jerome,

thank you for your quick support. The removeable of the <span> did the trick :lol:

Edit:
For everyone else. Replace line 126 in /plugins/hikashoppayment/sagepay.php from:
Code:
'<description>'.$product->order_product_name.'</description>'.

to:
Code:
'<description>'.strip_tags($product->order_product_name).'</description>'.
Last edit: 11 years 10 months ago by Head.
The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago - 11 years 10 months ago #180570 by Head
Replied by Head on topic Sage Pay does not work
Hi,

I've got a new one :-)

I've switched to the Plugin to Live mode. When I try to pay I get the following message:

Status: MALFORMED
Statusdetail: 3045 : The Currency field is missing.


And here is the data for sage pay (I stripped the URLs and Address). As you can see, the field Currency is there:
Code:
VendorTxCode=15&Amount=10.2&Currency=EUR&Description=R15&SuccessURL=http://XYZ.de/arenz/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=sagepay&notif_id=5&tmpl=component&lang=de&Itemid=125&FailureURL=http://XYZ.de/arenz/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=sagepay&notif_id=5&tmpl=component&lang=de&Itemid=125&CustomerName=Head&SendEMail=0&BillingFirstnames=Head&BillingSurname=Head&BillingAddress1=My Address&BillingAddress2=&BillingCity=My City&BillingPostCode=12345&BillingCountry=DE&DeliveryFirstnames=Head&DeliverySurname=Head&DeliveryAddress1=My Address0&DeliveryAddress2=&DeliveryCity=My City&DeliveryPostCode=12345&DeliveryCountry=DE&ReferrerID=B5C3FBCA-9E9C-4C49-B3ED-3AFEEF7592A4&BillingAgreement=0&AllowGiftAid=0&ApplyAVSCV2=0&Apply3DSecure=0

Any Idea?
Last edit: 11 years 10 months ago by Jerome.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #180574 by Jerome
Replied by Jerome on topic Sage Pay does not work
Hi,

It is strange (and not helpful) that the test mode is working and the live is not.
If we can't test correctly the plugin in test mode...

Can you please edit the plugin and replace
Code:
$t[] = $k . '=' . $v;
By
Code:
$t[] = $k . '=' . urlencode($v);
In order to force the url encoding ; But I got only a test account for SagePay, I'm not able to make live orders and be sure of my modification... So I'm a little upset that the live is not acting like the test mode !

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #180663 by Head
Replied by Head on topic Sage Pay does not work
Hi Jerome,

I'm sorry I've bothered you with that. I've entered the wrong password for the live system :whistle:

Thank you for your quick response!

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #180665 by Jerome
Replied by Jerome on topic Sage Pay does not work
Hi,

Good to know that the plugin is working fine.
Typo are human ; we make some too !

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Time to create page: 0.225 seconds
Powered by Kunena Forum