Zen Cart Logo
Forums / Addon Payment Modules / Nixaks Sagepay Form Module

Nixaks Sagepay Form Module

Views: 60,942

Results 101 to 120 of 214
24 May 2010, 11:31 PM
#101
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Nixaks Sagepay Form Module

A Little update for you all :D

At the moment version 1.3 has been fully tested on a php 5 server using zen-cart 1.3.9b :clap: so I know that all works.

As for version 1.4 which is the one damiantaylor definatly wants lol so far I have the return message un-encrypted and infomation from that is stored in the customers order in your admin panel.

That leaves me with one problem to fix at the moment which is the customer seeing an error message when the payment fails ..... I thought I had cracked it the other day but unfortunatly not :censored:

Please be patient with me and hopefully I will have some more good news soon.

Regards
Nixak

8 Jun 2010, 4:16 PM
#102
upnorthal avatar

upnorthal

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Hi

Has anyone tried this module with version 1.3.9d of ZenCart?

Cheers

Al

8 Jun 2010, 5:43 PM
#103
upnorthal avatar

upnorthal

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

ok, it appears to work in 1.3.9d.

guess we are just waiting on the error message decodes for when failed auths get bounced back.

8 Jun 2010, 7:40 PM
#104
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Re: Nixaks Sagepay Form Module

upnorthal:

Hi

Has anyone tried this module with version 1.3.9d of ZenCart?

Cheers

Al

Hi upnorthal,

Although I haven't updated yet, unless zen-cart made major changes to the payment system side of its software (which I don't see mentioned in the patch notes) then this module will work without any problems.

Hope this helps
Nixak

9 Jun 2010, 8:34 AM
#105
upnorthal avatar

upnorthal

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

thanks Nixak.

It appears fine.

Cheers

Al

28 Jun 2010, 6:36 PM
#106
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Hi again Nixak.
I'm not after message decoding this time, I think I may have found a slight bug.
I have used gift vouchers on my store which allows the customer to purchase a product using vouchers rather than paying by credit card.
If on the checkout page they use gift vouchers to the full value of their purchase, but still select the radio button to pay by sage pay, the module calls the sage pay api even though the transaction value is zero.
This gives an error screen on sage pay.

Is there a way to stop the sage pay api being called if the transaction value is zero?

Cheers,
Damian

29 Jun 2010, 1:48 PM
#107
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Sorry Nixak, I think I jumped the gun a bit there!
I don't think this is a problem with your mod, I think it's a recent module that I've installed because I got the same problem with the built in PayPal payments module.
When I removed the new mod, everything is ok.
Ignore this one!

9 Jul 2010, 10:54 AM
#108
claudiu_boonsoft avatar

claudiu_boonsoft

New Zenner

Join Date:
Jul 2010
Posts:
1
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Hi Nixaks!
Thanks for this nice module.

It is working for me but on one site I have some problems because the shop admin need to contact SagePay to activate the account. :lamo:

But I found another small bug regarding the customer name. The post name is to long :frusty:. I do not know the exact max length allow by the sagepay, but we need to limit that when we post the request to SagePay.

Zen Cart has is set to 32 char on bouth FirstNane and LastName.

The request Data are:

FirstName:Boonsoft Develop Test
LastName:Claudiu

The Error Message from SagePay:

This transaction attempt has failed. Please use the Proceed button go back to the web store from which you were purchasing. The details of the failure are given below.

Status: INVALID

Status Detail: 3110 : The BillingFirstnames value is too long.

9 Jul 2010, 2:32 PM
#109
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Re: Nixaks Sagepay Form Module

Hi claudiu_boonsoft,

The problem your having is because SagePay will only allow a maximum of 20 characters for the firstname and 20 characters for the last name, this inludes all spaces,commas, full stops etc etc.

Sorry I can't be more helpfull but as this limit is set by SagePay, I am unfortunatley unable to do anything about it.

Kindest regards
Nixak

13 Jul 2010, 10:05 AM
#110
andy_c avatar

andy_c

New Zenner

Join Date:
Jul 2010
Posts:
7
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Is it possible to over-ride the email address sent to SagePay? I want to send a different address to the shop owner email, as its a different part of the office that deals with the payment processing.

14 Jul 2010, 3:15 PM
#111
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Re: Nixaks Sagepay Form Module

Andy_C:

Is it possible to over-ride the email address sent to SagePay? I want to send a different address to the shop owner email, as its a different part of the office that deals with the payment processing.

Hi Andy_C,

Sorry about my late reply, i'm at work way too much at the moment :cry:

Untill I can get some time to re-code the module what you can do is open includes/modules/payment/sagepay_form.php

Find this line

$plain .= "VendorEMail=" . STORE_OWNER_EMAIL_ADDRESS . "&";

and replace STORE_OWNER_EMAIL_ADDRESS with the email address you want, make sure you wrap the email address within speech quotes and leave the single space between the full stops, so it should look something like this

$plain .= "VendorEMail=" . "[email protected]" . "&";

and that should do it :clap:

Regards
Nixak

14 Jul 2010, 9:26 PM
#112
andy_c avatar

andy_c

New Zenner

Join Date:
Jul 2010
Posts:
7
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Nixak:

Hi Andy_C,

Sorry about my late reply, i'm at work way too much at the moment :cry:

Untill I can get some time to re-code the module what you can do is open includes/modules/payment/sagepay_form.php

Find this line

$plain .= "VendorEMail=" . STORE_OWNER_EMAIL_ADDRESS . "&";

> 
> and replace STORE_OWNER_EMAIL_ADDRESS with the email address you want, make sure you wrap the email address within speech quotes and leave the single space between the full stops, so it should look something like this
> ```
$plain .= "VendorEMail=" . "[email protected]" . "&";

and that should do it :clap:

Regards
Nixak
That looks like exactly what I want :D Ive made the change, so time to sit and wait for another order :laugh:

Thanks for the help and even bigger thanks for the SagePay form - couldnt believe how easy it was to set up and get working :thumbsup:

29 Jul 2010, 8:39 PM
#113
sailsport avatar

sailsport

New Zenner

Join Date:
Jul 2010
Posts:
10
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

avova:

Hi,

I've had the same problem as above and I've added a couple of lines that basically check to see if the Delivery information is missing ( to be specific I check the street address and country ) and if it is I copy the billing details into the delivery details array.

I've tested it and it works fine for me.

See modified file attached with the updated code commented.
I hope someone else will find it usefull

Regards,

Mark
www.avova.ie

Mark, I too have the same problem with Gft Vouchers, as ZenCart treats them as virtual products and fails to fill in shipping address, which makes SagePay reject it.

I tried your code, but it doesn't work for me. In fact it has exactly the same number of lines (475) of code as the original 1.3.

Maybe I am tired and doing something supid, or maybe you posted the wrong file. Can you check, and see if I'm going mad?

I'm guessing I could code the appropriate IF statement with a bit of trial and error, but I'm a bit new to PHP, so if you have code that works then that would be good.

Alan

30 Jul 2010, 5:04 PM
#114
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Re: Nixaks Sagepay Form Module

Hi all,
I belive I have a fix for all of you who have problems with virtual products where the delivery fields are not being sent to SagePay :oops:

However you should note this fix is untested, so if you apply this fix the first thing you MUST do is backup your database and server files (sorry about the next bit, but if I don't say it then someone will moan at me if things go wrong) as I will not be held responsable if anything bad happens and you didn't backup everything first.

Ok so here goes

  1. BACKUP EVERYTHING
  2. Open includes/modules/payment/sagepay_form.php (in a good text editor such as notepad++)
  3. find this block of code
$plain .= "DeliverySurname=" . $order->delivery['lastname'] . "&";
		$plain .= "DeliveryFirstnames=" . $order->delivery['firstname'] . "&";
		$plain .= "DeliveryAddress1=" . $order->delivery['street_address'] . "&";
      if (ACCOUNT_SUBURB == 'true') {
        $plain .= "DeliveryAddress2=" . $order->delivery['suburb'] . "&";
    }
		$plain .= "DeliveryCity=" . $order->delivery['city'] . "&";
		$plain .= "DeliveryPostCode=" . $order->delivery['postcode'] . "&";
		$plain .= "DeliveryCountry=" . $order->delivery['country']['iso_code_2'] . "&";
     if (($order->delivery['country']['iso_code_2']) == 'US') {
		$orderdelivstate = $order->delivery['state'];
		$plain .= "DeliveryState=" . $us_state_codes[$orderdelivstate] . "&";
	 }else{
		$plain .= "DeliveryState=" . "&";
    }
		$plain .= "DeliveryPhone=" . $order->customer['telephone'] . "";
  1. replace all of the block of code with the code below
// DeliveryXXX fields	
		if ($order->delivery['lastname']===NULL) {
		$plain .= "DeliverySurname=" . $order->billing['lastname'] . "&";
		} else {
		$plain .= "DeliverySurname=" . $order->delivery['lastname'] . "&";
	}	
		if ($order->delivery['firstname']===NULL) {
		$plain .= "DeliveryFirstnames=" . $order->billing['firstname'] . "&";
		} else {
		$plain .= "DeliveryFirstnames=" . $order->delivery['firstname'] . "&";
	}	
		if ($order->delivery['street_address']===NULL) {
		$plain .= "DeliveryAddress1=" . $order->billing['street_address'] . "&";
		} else {
		$plain .= "DeliveryAddress1=" . $order->delivery['street_address'] . "&";
	}	
		if (($order->delivery['suburb']===NULL) && (ACCOUNT_SUBURB == 'true')) {
        $plain .= "DeliveryAddress2=" . $order->billing['suburb'] . "&";
		} elseif ((ISSET($order->delivery['suburb'])) && (ACCOUNT_SUBURB == 'true')) {
		$plain .= "DeliveryAddress2=" . $order->delivery['suburb'] . "&";
		} else {
		$plain .= "DeliveryAddress2=" . "" . "&";
    }
		if ($order->delivery['city']===NULL) {
		$plain .= "DeliveryCity=" . $order->billing['city'] . "&";
		} else {
		$plain .= "DeliveryCity=" . $order->delivery['city'] . "&";
	}
		if ($order->delivery['postcode']===NULL) {
		$plain .= "DeliveryPostCode=" . $order->billing['postcode'] . "&";
		} else {
		$plain .= "DeliveryPostCode=" . $order->delivery['postcode'] . "&";
	}
		if ($order->delivery['country']['iso_code_2']===NULL) {
		$plain .= "DeliveryCountry=" . $order->billing['country']['iso_code_2'] . "&";
		} else {
		$plain .= "DeliveryCountry=" . $order->delivery['country']['iso_code_2'] . "&";
	}
		
	if (($order->delivery['country']['iso_code_2']) == 'US') {
		$orderdelivstate = $order->delivery['state'];
		$plain .= "DeliveryState=" . $us_state_codes[$orderdelivstate] . "&";
	 }else{
		$plain .= "DeliveryState=" . "&";
    }
      
		$plain .= "DeliveryPhone=" . $order->customer['telephone'] . "";
  1. Save the file and upload it

You should now hopefully be all fixed :clap::clap:

If anyone has any problems just post them in here as I have notifications for this thread turned on, so I will know right away :cool:

Regards
Nixak

31 Jul 2010, 4:29 PM
#115
sailsport avatar

sailsport

New Zenner

Join Date:
Jul 2010
Posts:
10
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Many thanks.

I have tested this on my test system with virtual, non virtual, and combined virtual and non virtual, same shipping and different shipping addresses, and it seems good.

As Nixaks says, back it all up first. The first attempt I failed to cut and paste the complete code ......

Alan

31 Jul 2010, 4:35 PM
#116
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Re: Nixaks Sagepay Form Module

sailsport:

Many thanks.

I have tested this on my test system with virtual, non virtual, and combined virtual and non virtual, same shipping and different shipping addresses, and it seems good.

Thank you :clap:

sailsport:

As Nixaks says, back it all up first. The first attempt I failed to cut and paste the complete code ......

Alan

Lol the perils of coding :frusty: ...... hope you had it all backed up :P

9 Aug 2010, 2:49 PM
#117
orexis avatar

orexis

New Zenner

Join Date:
Aug 2010
Posts:
1
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

hi, sorry about this but I'm having some trouble.

no matter what i try i cant get away from the 5030 error. the password I'm entering is correct as I can access the account on the sign in section of sagepay so I'm guessing its invalid encoding however this is the first time I've had to work with SSL and curl and so I've no idea what to do. Its also the first time I've worked with both Zen cart and sagepay.

If any one can help I'd be really thankful.

(version number: 1.3.9d)

12 Aug 2010, 8:49 AM
#118
sailsport avatar

sailsport

New Zenner

Join Date:
Jul 2010
Posts:
10
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

I possible clue, you say " the password I'm entering is correct as I can access the account on the sign in section of sagepay "

The password for the module is the encryption password not your normal user log-in to sagepay password.

I can't recall right now where I got the encryption password from, but it is definitely different to my log-in password. Hope that helps

14 Aug 2010, 12:13 PM
#119
nixak avatar

nixak

Zen Follower

Join Date:
Nov 2007
Location:
Essex, UK
Posts:
137
Plugin Contributions:
1

Re: Nixaks Sagepay Form Module

Hi all, sorry about the late reply but i've been away on holiday.

Orexis your problem is as described by Sailsport ... when you received your paperwork for SagePay you will have received 2 passwords - 1 of these is your login password and the other is labelled as an encryption password, you need to use the encryption password, which I belive is case sensitive.

Hope this helps
Nixak

20 Oct 2010, 11:20 AM
#120
checooper avatar

checooper

New Zenner

Join Date:
Apr 2006
Posts:
76
Plugin Contributions:
0

Re: Nixaks Sagepay Form Module

Hi,

I am having the following issue -

Customer picks sagepay has payment then goes to sagepay fills out cards details etc.. and confirms, but the payment fails saying the below in an email to admin -

** FAILURE notification **

The following transaction FAILED... An error occurred at Sage Pay. Please contact us with the details shown below.
Transaction type: PAYMENT
VendorTxCode: xxxxxxxxxxxx
VPSTxId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Amount: 216.19 GBP
Gift Aid: No - Not a Gift Aid transaction.
AVS/CV2 Response: DATA NOT CHECKED - CV2:NOTPROVIDED, Address:NOTPROVIDED, Post Code:NOTPROVIDED
3D Secure Result: NOTCHECKED
Customer Name: xxxxxx xxxx
Customer e-mail: [email protected]
Contact Number:
Contact Fax:
IP Address Location: Country: United Kingdom
Card Used: Card used: Visa Debit / Delta - XXXX XXXX XXXXxxxx - Attempt:1
Card Issuer: xxxxxxx Bank Plc, United Kingdom
Bullet Point Order total: 216.19 GBP
Card used: Lloyds Tsb Bank Plc, United Kingdom - Visa Debit / Delta - XXXX XXXX XXXXxxx - Attempt:1
Bullet Point Your customer bought: Goods from York Flooring Supplies
Description Quantity Item Value Item Tax Item Total Line Total
SISAL TETOUAN 1 179 31.33 210.33 210.33
Shipping --- --- --- --- 4.99

Zen Cart Version 1.3.9f
Fast and easy checkout
IH 2 rev8
zen lightbox

site - https://www.yorkflooringsupplies.co.uk

I tested in demo and all worked fine, Can anyone please help.

Thanks Che