Sage Pay does not work

  • Posts: 18
  • Thank you received: 2
10 years 3 weeks ago #177679

-- 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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 weeks ago #177682

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 18
  • Thank you received: 2
10 years 3 weeks ago #177940

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 weeks ago #177943

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

		if($this->payment_params->debug) {
			print_r($postData,true)."\n\n\n";
		}
By
		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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 18
  • Thank you received: 2
10 years 3 weeks ago #177975

I use the Backend in German, so I do not know the original label of the link.

I'v allready edited that lines to:

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 weeks ago #177983

Hi,

Thanks !
Can you please replace the line

'<description>'.$product->order_product_name.'</description>'.
By
'<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
$postData['BasketXML'] = $bxml;
By
// $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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 10 years 3 weeks ago by Jerome.

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

  • Posts: 18
  • Thank you received: 2
10 years 3 weeks ago #177994

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:

'<description>'.$product->order_product_name.'</description>'.

to:
'<description>'.strip_tags($product->order_product_name).'</description>'.

Last edit: 10 years 3 weeks ago by Head.
The following user(s) said Thank You: Jerome

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

  • Posts: 18
  • Thank you received: 2
10 years 6 days ago #180570

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:

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: 10 years 6 days ago by Jerome.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 6 days ago #180574

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

$t[] = $k . '=' . $v;
By
$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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 18
  • Thank you received: 2
10 years 5 days ago #180663

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 5 days ago #180665

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum