-
Nixaks Sagepay Form Module
Just thought I would let you all know that I have a Sagepay Form Module that is almost ready to be released :clap: I have checked this module on sagepay's simulater and their test site and all seems to be working well.
I will release the module as soon as I can get one little problem figured out (the send shopping cart details to sage pay is giving me a headache :blink: lol)
If you can help with the problem please see this post Send shopping cart details to sagepay problem
-
Re: Nixaks Sagepay Form Module
Version 1.0 of this module has been submitted to the downloads section: http://www.zen-cart.com/index.php?ma...oducts_id=1385
Note. version 1.0 does not upload the Shopping Cart/ Basket details to SagePay, hopefully this will be implimented in a future version
-
Re: Nixaks Sagepay Form Module
Version 1.1 released.
Changes:
Tidied up the coding.
Billing address phone number now being recieved by Sage Pay simulator.
Delivery address line 2 now being recieved by Sage Pay simulator.
Important Notes:
Sage Pay do not seem to accept the "any currency" setting, please leave the setting on "default currency"
Sage Pay simulator uses a different password to the test & live servers. Simulator password is supplied below the error message when you use the simulator.
Version 1.1 does not upload the Shopping Cart/ Basket details to SagePay, hopefully this will be implimented in a future version.
-
Re: Nixaks Sagepay Form Module
Hi Nix
Just downloaded an tested this - everything is fine but no order email is sent after returning to the store.
If I pay by cheque an order email goes out - if I pay by sage pay - I get an email from sage pay but not the store? I am returned successfully and the order details are recorded in the back office - any ideas?
-
Re: Nixaks Sagepay Form Module
Hi Peanut77, thank you for letting me know, I will look into it and let you know asap.
-
Re: Nixaks Sagepay Form Module
Hi there,
I've setup the module (thanks works well!) but when the purchaser returns to zen cart, there is no order number, and no record of the purchase on the zen cart admin panel... any ideas why that might be?
-
SagePay Form URL
i'm attempting to get my website www.windowcleaningcoach.com/zencart to use sage pay form simulator
Apparently i need to place this: 'https://test.sagepay.com/Simulator/VSPFormGateway.asp'
somewhere, maybe in the action part of the form tag??
basically i don't know where the location is that i should place
'https://test.sagepay.com/Simulator/VSPFormGateway.asp'
has anyone any ideas?
-
Re: SagePay Form URL
Are you using a SagePay add-on mod, or trying to build one yourself?
-
Re: SagePay Form URL
i'm using at the moment nixaks sage pay form module. i don't have anywhere near the knowledge required to do one myself.
-
Re: Nixaks Sagepay Form Module
Hi guys,
hmm.... switched back to Sage Pay test mode... same problem still there... I altered the settings on the stock page (under config) ... maybe that's the problem... any suggestions?
Warm Regards,
Joel
-
Re: SagePay Form URL
Hi Dave,
I'm doing the same thing.
Download the module, unzip, read the readme, then upload the two files to their correct locations.
Login to Zen Cart, go to modules, payment, there should be a new module called Sage Pay at the bottom. This is what you install.
Type in the relavant details (username and the encryption password from Sage Pay)
Set it to test mode.
Go to your shop, buy something, when you get to sage pay, you MUST ENTER THE DEMO CARD DETAILS shown in the Zen Cart Sagepay screen- the card start and expiry date can be whatever, but you need to cut and paste the other details.
Complete the test transaction.
Login to Sagepay. Check it's all gone through ok.
You need to do a demo transaction and refund it before the account can go live, so find the tranaction, open it, and click where it says refund.
Then ring up Sage Pay, get them to upgrade the account.
In Zen Cart, set Sage Pay to live...
Do another transaction, refund it as above, and that should be it!
Good luck!
Warm Regards,
Joel
-
Re: SagePay Form URL
Hi, sorry i've not been around. Dave you have a pm :D
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
optimalwebsite
Hi there,
I've setup the module (thanks works well!) but when the purchaser returns to zen cart, there is no order number, and no record of the purchase on the zen cart admin panel... any ideas why that might be?
It all worked at first but now I have the same problem lol typical
I will have some time this weekend and I will do my best to find out what has happened.
Peanut77 I am still looking in to the email problem but from what I've found so far the payment module should not have anything to do with emails ..... I will keep looking though.
-
Re: Nixaks Sagepay Form Module
IMPORTANT! The Sagepay technical support line has been engaged all afternoon, so this may be a problem at their end and they're struggling to cope with the deluge of calls for help...
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
optimalwebsite
IMPORTANT! The Sagepay technical support line has been engaged all afternoon, so this may be a problem at their end and they're struggling to cope with the deluge of calls for help...
Sage Pay are very busy at the moment due to an unexpected huge increase in people using their service's after they re-named from Protx. They are training up new advisors but it will be a little while before they are ready.
Unfortunatly as they do not and will not create modules (all the modules on their site were created by the e-commerce sites involved) they are unable to help. Thank you for the post though optimalwebsite :clap: as if I had not known it would have been extremly usefull.
I have contacted DrByte to see if I missed anything in the coding (this is my first ever mod) and hopefully we will have this fixed very soon.
-
Re: SagePay Form URL
thanks guys for the advice, its all a bit confusing for me, but i think i'm back on track now and i've got the module working thanks to you.
-
Re: SagePay Form URL
Hi Dave,
I've emailed over some new very detailed setup instructions... but if it helps anyone else I'll put them here too:
ZEN CART SAGEPAY FORM
Designed by: Jeramie Risinger, gapc23, Bean Fairbanks
License: This product licensed under the GPL. See attached license for information.
========================================================
BEGIN BY PRINTING THIS, IT'S FAR EASIER TO REFER TO THIS IN YOUR HANDS THAN ON SCREEN.
========================================================
HISTORY:
22/07/2009 - Initial Release, version 1.0
========================================================
REQUIREMENTS:
*SagePay Form account
*cURL is required and MUST be compiled into PHP with SSL support
*SSL Certificate
*Port 43924 open for bi directional communication
========================================================
NOTES:
SagePay is the new name for Protx.
This module can be used on any one of the three modes that SagePay offer (simulation, test or live.)
========================================================
HOW IT WORKS:
Customers confirm a purchase in your shop, when they checkout the amount and
address is forwarded to the SagePay website. The client then enters their bank account
details. SagePay communicates with the customer's bank, then returns the customer
back to your shop. SagePay sends out a confirmation email, as does Zen Cart, and you
can then administer the transaction from the admin screen.
========================================================
NEW FILES:
includes/modules/payment/sagepay_form.php
includes/languages/english/modules/payment/sagepay_form.php
========================================================
MODIFIED FILES:
None
========================================================
INSTALLATION:
The files are arranged in the same structure as Zen-Cart v1.3.8a
When you open the SagePay_Form, you'll see a folder called "includes"
copy this into the root of your shop, so it merges with the existing
folder called "includes".
Login to the admin section of your zen cart shop. Go to "Modules", then "Payment"
Select SagePay_Form from the list.
========================================================
SETUP:
Set enable mode to "true".
Enter your SagePay vendor name.
Enter the encryption password provided by SagePay which is unique to your shop.
Set transaction mode to "test".
========================================================
TEST MODE:
SagePay require you to complete at least one payment in test mode & refund it before you can use their live server.
Leave the admin screen and go back to the front end of your shop. Make a purchase with SagePay as you would as if you're a customer.
When you hit the final checkout button you'll be directed to the SagePay test server, which has "test" written on the background.
DO NOT ENTER REAL CREDIT CARD DETAILS ON THE TEST SERVER, THEY WILL NOT WORK.
Select a credit card type to pay with and use the corresponding card number:
VISA - 4929000000006
MASTERCARD - 5404000000000001
DELTA - 4462000000000003
SOLO - 6334900000000005 - Issue 01
DOMESTIC MAESTRO - 5641820000000005 - Issue 01
AMEX - 374200000000004
ELECTRON - 4917300000000008
JCB - 3569990000000009
DINERS - 36000000000008
The "valid from" and "expires" date can be anything.
You will also need to supply the following values for CV2, Billing Address Numbers
and Billing Post Code Numbers.
These are the only values which will return as Matched.
Any other values will return as Not Matched.
CV2 - 123
Billing Address Numbers - 88
Billing Post Code Numbers - 412
You will also need to enter the 3D Secure password as " password " (it is case sensitive)
so that the 3D Secure authentication returns Fully Authenticated.
When testing be careful when repeatedly buying the same dummy product, this can create
problems producing an order number when you return to your website after the
transaction has been completed.
========================================================
SAGEPAY:
Login to SagePay (Google "Login to SagePay" to find the relevant screen) with your username and password.
Note: don't do this with your "main" admin identity, instead you should setup another identity with your admin account, give it all permissions by ticking the row of boxes, and login as this.
Search for the transaction, select it, open it, and refund it.
Now contact SagePay (tel: 0845 0554454 ) and tell them you're ready to go live.
Then you're good to go back to the admin screen, modules, payments, SagePay, transaction mode, and change over to "live".
-
Re: Nixaks Sagepay Form Module
Hi there,
Any news? I hope its going well!
Joel
-
Re: Nixaks Sagepay Form Module
After several days of pulling my hair out :frusty: I have fixed the problems :clap:
Version 1.2 has been submitted and should be available very soon. Thank you to peanut77 & optimalwebsite for helping me go bald lol. The readme file has also been updated - Thank you to optimalwebsite for suggesting the changes.
PLEASE uninstall any older versions (remembering to backup your store and database first) before installing v1.2
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
Nixak
Version 1.1 released.
Version 1.1 does not upload the Shopping Cart/ Basket details to SagePay, hopefully this will be implimented in a future version.
Hi, I was just wondering if this is resolved in 1.2 as there is no note on your 1.2 post. If it isn't resolved, could you please explain what problem this would cause to a store owner? Would they have problems matching orders with payments?
Cheers,
Chris
-
Re: Nixaks Sagepay Form Module
Hi Chris, sorry I forgot to say that 1.2 does not upload the shopping cart/basket details either.
The problem is explained in this post, if anyone can help please let me know.
-
Re: Nixaks Sagepay Form Module
Just a little update regarding the basket contents, I have finally got it to work :laugh: I will test it over the next few days and as long as all is well I will realease it somtime this weekend hopefully.
If anyone has any requests regarding this module, please post them here and I will see what I can do :cool:
-
Re: Nixaks Sagepay Form Module
No problems so far, only compliments! We took our first order with it today, do congrats from Joel in Bath! :clap: :clap:
-
Re: Nixaks Sagepay Form Module
great news:clap:
but I can't download it. it's said the file has been deleted on this server?
can anybody help me?
thanks:shocking:
-
Re: Nixaks Sagepay Form Module
Hmm wierd I have just checked and it downloaded fine for me, maybe ZC was having a funny turn lol, try again mattsun and let me what happens please.
-
Re: Nixaks Sagepay Form Module
Hi Nixaks,
Thanks for your attention. It works now.:clap:
Great Job!
-
Re: SagePay Form URL
Thanks a lot.
That's really helpful.
-
Re: Nixaks Sagepay Form Module
Hi Nixaks, you say you are now successful in having the basket contents go through to the SagePay form. Has this version been released yet?
I've just downloaded 1.2 and using it with the Simulator, the Basket field reports: No Basket Contents provided. Field is optional. Is that because you've not yet released the fixed version or because I've not configured something properly?
Cheers.
-
Re: Nixaks Sagepay Form Module
Hi ChrisHart,
The basket contents version has not been released as I did not get a chance to test it and I found sooooooo many other things I could do with the module that I was trying to incorparate, however unfortunatly due to family and work taking up so much of my time I have not touched the module since september. In a couple of weeks I may have some time (as I am due 2 weeks off work:cool:) as long as the wife doesn't make us move home, which is what she is looking in to as I type this :frusty:.
-
Re: Nixaks Sagepay Form Module
Ok, thanks Nixak. Can you remember if it was a simple mod to allow the basket details to come through? If so, maybe I could make a manual edit to your module until such time you release your next version.
Another question on the SagePay process if you don't mind. When using the simulator, it shows the success and failure URLs at the top of the page. The failure URL is listed as http://www.****.com/catalog/index.ph...eckout_payment
If I choose to test an unauthorised payment in the simulator, the rejection url is correctly used and redirect the user back to the store and to step 2 of 3 - payment options. However, there are no warnings to indicate to the user that the payment was unauthorised which they may find confusing. Is this normal or do I need to configure/code something?
Cheers for any help.
-
Re: Nixaks Sagepay Form Module
The basket details code took me best part of 3 months to get working (although I am no coder) due to SagePay's strict formatting. I will try to realease the basket details version over this weekend or latest on Monday 9th Nov as I have the morning at home.
On your other question I descovered that Sagepay send back a coded message upon a failure, this message needs to be decoded (which is the easy part) but then it needs to be intergrated in to your database and zen cart session in order for it to display to the customer. This is some major coding for me and is what I was attempting to work out how to do before I became so busy with work and family. So hopefully with my 2 weeks off work coming up I can get some time (and headache tablets lol) and attempt to get this working.
Your interest in my module (and my wife's moaning lol) has given me the boost to dig out my old files (of which there are loads) and try to get this project finished, so I will find the time soon to get cracking on it.
-
Re: Nixaks Sagepay Form Module
Sounds great Nixak. I'll wait with baited breath! :D
-
Re: Nixaks Sagepay Form Module
Hi all, I thought I had better explain why I have not released the basket details version yet, this is because whilst making the basket details work I (in my infinate wisdom :eek:) re-wrote the entire module. I must of had a mad moment when I did this :bangin: but the new Version 2.0 will include switches in the admin to allow you to do everything that SagePay allows, including overriding the AVS/CV2 settings, different payment types, allowing gift aid etc etc.
I still have two things to add to the module which is:
1) Cards accepted and secured by SagePay sidebox.
2) To decode and intergrate the infomation returned by SagePay so as the customer and the admin know whether there has been any problems with the payment.
If there is anything you would like to see added to the module please post your suggestions and I will try to incorperate them.
-
Re: SagePay Form URL
Hi,
I a bit confused, Sage pay is aimed at the UK market.
But after installing the plugin for sage pay it gives me the following option when I click edit on Net1 Payment Services in Zen Cart
Transaction Currency
The currency to use for credit card transactions
CAD & USD
Where is GBP?
The module I downloaded was loacated at http://www.zen-cart.com/index.php?ma...roducts_id=580
Zen Cart 1.38a
-
Re: Nixaks Sagepay Form Module
Hows it going Nixak? Any progress? :)
-
Re: Nixaks Sagepay Form Module
Hi Guys,
Need a little help on this mod - i've installed it and tested it using 'test' mode and all worked great.
However, as soon as i moved it into 'live' mode and tested a transaction, it returned with:
'4006 : The TxType requested is not supported on this account.'
Any help appreciated!
Thanks,
Kev
www.sunplastics.co.uk
-
Re: Nixaks Sagepay Form Module
Hi Kev,
Have you done ALL the required testing before trying to switch to live?
e.g. done refunds etc.
Sage Pay need you to do this bit before the live is REALLY live.
-
Re: Nixaks Sagepay Form Module
Not to worry - it was Sagepay not getting their finger out quick enough! Sorted now!
-
Solution to problem when unable to decryt the encrypted response from Sage Pay
Hi everyone,
Nixak just wanted to tell you that you are doing a great service to a lot of people.
Just came across something and wanted to share with everyone.
The PHP base64_decode sometimes does not decrypt the encrypted message correctly (due to white spaces) thereby causing problems.
After going through Sage Pay Form sample code they provide on their website I found the following function which they use to decrpyt the encrypted response.
PHP Code:
function base64Decode($scrambled) {
$output = "";
$scrambled = str_replace(" ","+",$scrambled);
$output = base64_decode($scrambled);
return $output;
}
If you add the above function to your class in the includes/modules/payment/sagepay_form.php and make the following change then I think this can help people who may encounter problems while decrypting the encrypted string.
On line 222 where you have the line
PHP Code:
$Decoded = $this->SimpleXor(base64_decode($crypt),MODULE_PAYMENT_SAGEPAY_FORM_PASSWORD);
you can change it to
PHP Code:
$Decoded = $this->SimpleXor($this->base64Decode($crypt),MODULE_PAYMENT_SAGEPAY_FORM_PASSWORD);
Hope it helps.
Kind Regards,
Adeel
-
Re: Nixaks Sagepay Form Module
Hello all, i am having issues installing the Sage Payment Solutions module for the payment processing company at www.SagePayments.com. I am assuming this SagePay you all are referring to is a different company?
thanks,
-
Re: SagePay Form URL
i am having some issues trying to install the Sage payment module for zen cart. Are there 2 different sage companies and i found 2 modules on Zen cart add ons. Your Sage module is for what company url. I am trying to install for this :www.sagepayments.com.
Is that the same sage payment module you all are discussing on the thread? If so, the requirements :
REQUIREMENTS:
*Net1 merchant credit card account
*cURL is required and MUST be compiled into PHP with SSL support
*SSL Certificate
-
Re: SagePay Form URL
*SagePay Form account
*cURL is required and MUST be compiled into PHP with SSL support
*SSL Certificate
*Port 43924 open for bi directional communication
Just a few questions ....
I have a sagepay account, but when I try the test mode, it tells me I don't have the right Vendor Name ... but I am using my Sagepay Vendor name ... any ideas about what is happening?
Also can you explain how I make sure I have the above requirements ....
I am a newbie to all this but learning loads and loads .... Thank you to everyone who replies to questions. You are what makes this a GREAT community.
Many thanks.
Gillian
-
Re: SagePay Form URL
Hi
Below is the error message I am getting when I try to buy something through my site. Any ideas why this might be?
Many thanks
Gillian
* * * * *
*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: 5030 : Unable to decrypt the request message. This might be caused by an incorrect password or invalid encoding.
*
-
Re: Nixaks Sagepay Form Module
Hi Nixlak,
Great module thanks for that but I have a slight problem.
If you could help I would be very gratful.
Sagepay is throwing back an error when trying to complete orders to the United States.
"The billing state is required"
I have noticed that lines 181 "Billing State" has been commented out on the sagepay_form.php , is there a reason for this as I think it may be needed?
I have tried un-commenting it along with line 195 "Delivery State" and it seems to work but you have to change the Zone Names in Zencart to 2 letter codes otherwise you get "The billing state is too long".
This obviously does not look good when a customer is trying to choose what state they live in??
Can you shed any light on what promises to be another great module?
Cheers
-
Re: Nixaks Sagepay Form Module
Hi all, Iv'e not been keeping track recently due to a death in the family ..... however I will look into your comments tomorrow once i've has some sleep.
Tammygrant - this module is for Sage Pay who used to be Protx, their website is http://www.sagepay.com hope this helps
-
Re: Nixaks Sagepay Form Module
Hi all, thankyou for your messages :D
Asarfraz - thankyou for your message as it will help me in writing the decode side of the module (my biggest problem) I will adjust the coding as you described
Please note - the current module does not decode the encryted info sent back via SagePay as it's something I learned about after writing the module :blink:
Hairx - I commented out the billing and delivery state from the module as it wasn't required for where I live in the UK and it did not reconise any states other then America, however the next version does include a switch in the admin side to allow this to be turned on or off. I will look in to the zone names / codes to see if I can come up with a solution.
SagePay's customer service told me that all they really need is the first line of the address and the post/zip code ... is this different for American websites?
I'm off to go and dig out all my coding :blink: and I will try to update you all soon.
Thankyou
Nixak
-
Re: Nixaks Sagepay Form Module
Update - just spoke to Sagepay who have confirmed that the billing/delivery state is not needed unless the order is American .... so I will try to fix this asap
-
Re: Nixaks Sagepay Form Module
Hi Nixak
I am in the uk as well infact i am just down the road to you lol
I have a uk cart but also sell worldwide
I have a few customers from the states Hence how i found out the problem.
It would be great if you could look into the mod as when i un-commenting & changed the Zone Names in Zencart to 2 letter codes (which worked for US orders) all other countries stopped working
Thanks for taking the time :clap:
-
Re: Nixaks Sagepay Form Module
Hi all, after lots of headaches I am pleased to announce version 1.3 is on its way :clap: unfortunatly there seems to be a problem with updating contributions on the site at the moment but I will have it added as soon as it's fixed.
Changes for Version 1.3 :cool:
US state codes are now sent to SagePay and the module detects whether to send the state code or not i.e if the address is not American then the state codes are not sent (as they would cause an error) this applies to both the billing and delivery address even if they are different. Thankyou hairx for pointing out this problem.
Basket details can now be sent to SagePay. YES you read it right :P I have managed to get this working and it's been tested out on a live website.
I re-coded both the currency and transaction type switches so as to make them more intuative and so as they conform to Sagepay's rulings better.
Coded in the SendEmail flag. Now you can decide whether the emails that Sagepay sends out after a successful or un-succsessful transaction go to just yourself (the vendor), yourself and the customer or to niether.
Installation notes:
I highly advise that you backup both your website and database before following the instructions below. You may wish to put your site in to maintaince mode whilst carrying out this update.
1) From your admin panel (modules/payment) highlight the sagepay module and remove it via the remove button. MAKE SURE you have your vendor name and password stored somewhere.
2) Using an FTP client or your server side file access delete the following two files:
i) includes/modules/payment/sagepay_form.php
ii) includes/languages/english/modules/payment/sagepay_form.php
3) Install version 1.3 - the files are laid out correctly in the folders and there should be no files overwritten.
4) in your Zen-Cart admin go to modules/payment and install the sagepay module ensuring to enter your correct vendor name and password.
5) Enjoy :clap::clap:
Failure to delete the old sagepay_form.php files could cause errors and prevent the module from working correctly.
Version 1.3 has been tested on both a vanilla 1.3.8a install and on a live 1.3.8a website.
-
Re: Nixaks Sagepay Form Module
My new 1.3 version of the module was succesfully uploaded yesterday morning and will hopefully be realeased for download within the next few days. Obviously if the Zen-Cart team are very busy this could take a little while longer but I do have my fingers crossed for you all.
If you have any suggestions for improvements or any comments I would be glad to see what I can do.
-
SagePay Form payment module
I have downloaded and installed the very latest version of Zen Cart and also installed the SagePay Form payment module.
However, I've tried to do a couple of test transactions and when I go to checkout I keep getting directed to the following URL with this error message:
--
https://test.sagepay.com/gateway/ser...m-register.vsp
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: 5030 : Unable to decrypt the request message. This might be caused by an incorrect password or invalid encoding.
--
Any idea what is causing this?
I'm pretty sure the vendor name I'm entering via the admin of my zen cart is correct, but what password do I need to enter?
The password I'm using is the administrator one SagePay issued me with when we set the account up.
PLEASE HELP!
-
Re: Nixaks Sagepay Form Module
moderator's note - duplicate posts and threads have been merged here. Do not repost the same problem in multiple threads.
-
Re: SagePay Form payment module
Quote:
Originally Posted by
apovey
I have downloaded and installed the very latest version of Zen Cart and also installed the SagePay Form payment module.
However, I've tried to do a couple of test transactions and when I go to checkout I keep getting directed to the following URL with this error message:
--
https://test.sagepay.com/gateway/ser...m-register.vsp
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: 5030 : Unable to decrypt the request message. This might be caused by an incorrect password or invalid encoding.
--
Any idea what is causing this?
I'm pretty sure the vendor name I'm entering via the admin of my zen cart is correct, but what password do I need to enter?
The password I'm using is the administrator one SagePay issued me with when we set the account up.
PLEASE HELP!
Hi apovey, this sounds like you have entered the wrong password into the admin side of the payment module.
Before you use the module it sets up automaticly to use the simulater, the password for this will only be shown to you after you first try to use it, its shown on sagepays site that you are taken to.
If your going for test mode then the password is the encryption password that SagePay have supplied you with amongst your paperwork. The administrator password is for when you log in to your sagepay admin on their site.
Hope this helps
Nixak
-
Re: SagePay Form payment module
Quote:
Originally Posted by
Nixak
Hi apovey, this sounds like you have entered the wrong password into the admin side of the payment module.
Before you use the module it sets up automaticly to use the simulater, the password for this will only be shown to you after you first try to use it, its shown on sagepays site that you are taken to.
If your going for test mode then the password is the encryption password that SagePay have supplied you with amongst your paperwork. The administrator password is for when you log in to your sagepay admin on their site.
Hope this helps
Nixak
Thanks.
I'm setting the zen cart site up for someone, so I'll get them to check their paper work for the appropriate password.
-
Re: Nixaks Sagepay Form Module
Hi all,
I just wanted to let you all know that you can now also find both myself and my work on my website (link in signature) as well as here on Zen-Cart :D
-
Re: Nixaks Sagepay Form Module
Hi Nixak,
Thank you in advance for your work. We're thinking of switching over to Sagepay at the moment - Do you have any idea on the timeframe for releasing the 1.3 fixed up version. :smile:
-
Re: Nixaks Sagepay Form Module
Hi PatF,
Version 1.3 has been uploaded to zen-cart and my website (link is in my sig), however the zen team must be very busy at the moment as it's been over a week and they haven't released it yet. I am sure they will get round to it as soon as they can.
Hope this helps
Nixak
-
Re: Nixaks Sagepay Form Module
Hi Nixak,
Had a quick look there - all that was downloaded from your forum area was an empty folder though. :dontgetit
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
PatF
Hi Nixak,
Had a quick look there - all that was downloaded from your forum area was an empty folder though. :dontgetit
My sincere apoligies .... seems there was a problem with the website and downloads. It should be fixed now ... iv'e just tested it and all worked ok :clap:
p.s. if there is any problem on my site could you please post it there .... I don't want to upset the zen admins :shocking: but thank you for letting me know :D
-
Re: Nixaks Sagepay Form Module
Hi all,
Just recieved the email from the zen admins, version 1.3 can now be downloaded from the zen cart site :D thank you zen admins :clap:
-
Re: Nixaks Sagepay Form Module
Just download the 1.3 and havn't installed yet.
Still, I'd like to say Thank You to Nixaks.
:clap:
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
mattsun
Just download the 1.3 and havn't installed yet.
Still, I'd like to say Thank You to Nixaks.
:clap:
Your more than welcome :cool:
-
Re: Nixaks Sagepay Form Module
Hi quick question, does your Mod. support Sage Pay 'direct' method?
thanks
zac
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
zac123
Hi quick question, does your Mod. support Sage Pay 'direct' method?
thanks
zac
Hi Zac, sorry no this mod is for sagepay form only. There is a free module for direct somewhere ......... aha found it here (SagePay is the new name for Protx)
If you have any problems with it there is a forum thread for it somewhere, or let me know and I will see if I can fix it (I have a feeling it uses the old Protx http address's which may or may not work)
Regards
Nixak
-
Re: Nixaks Sagepay Form Module
great thanks for that.
zac
-
Re: Nixaks Sagepay Form Module
Nixak
Your module does not seem to support download products.
Sagepay wants the shipping address but downloads don't have this so there is an error message: Status Detail: 3144 : The Delivery information is required.
Have you addressed this issue?
-
Re: Nixaks Sagepay Form Module
If someone could help with adding an if / else statement in the code then we could get the billing info sent to SagePay if it is a download product and there is no delivery address.
Here is the section of code inside the file called includes/modules/payment/sagepay_form.php.
How do I add the statement in the section after this line:
Code:
$plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
In other words, the code must check to see if the customers delivery address OR postcode is empty. If both or any of the delivery fields are empty, it posts the billing address to SagePay instead.
Code:
$plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
$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'] . "&";
Would appreciate come help with this.thanks.
-
Re: Nixaks Sagepay Form Module
Hi MaryF,
I'm looking at the problem you've described but i'm a little confused, the delivery address is always the same as the billing address unless the customer specifies a different address, so Zen-cart will always have the delivery address and you should recieve no problems.
What version of Zen-Cart are you using? and are you using any mods, especially ones that allow the customers to checkout without registering to your site?
-
Re: Nixaks Sagepay Form Module
You are right! I have a fast and easy checkout module installed - it wasn't activated in admin so wasn't working yet. I had deactivated it a few weeks back in order to work on getting my shop transferred over from SagePay Direct to Form module.
It seems to be working fine now! Thanks.
-
Re: Nixaks Sagepay Form Module
-
Re: Nixaks Sagepay Form Module
Hey Nixak, thanks for a great module, but I'm having some trouble with the configuration, and I was hoping you might be able to help me out.
It seems that the module is not sending the TxType data to Sage Pay. I keep getting the following 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: MALFORMED
Status Detail: 3039 : The TxType or PaymentType is missing.
---
I have the module configured to "test," and the vendor name and encryption password are correct.
I tested the system with SagePay's testvendor account as well, and send the query to their showpost page, and got the following:
---
The Request.Form Collection
VPSProtocol = 2.23
TxType =
Vendor = testvendor
Crypt = [LEFT OUT BECAUSE IT'S HUGE]
btn_submit.x = 62
btn_submit.y = 15
---
As you can see, there seems to be no TxType being sent to SagePay.
Any idea what might be going on?
-
Re: Nixaks Sagepay Form Module
Hi KCMP, sorry to hear your having a problem.
Couple of things I need to check, are you using the latest version of the module? (1.3 is the current one) and are you using the up-to-date version of zen-cart? (1.3.8a) if not I would recommend updating. If you are up-to-date the only thing I can think of is that the one of the files was corrupted whilst uploading to your site (I've had this happen with certain ftp programs that I no longer use) so try deleting the two sagepay_form.php files and re-upload them. If this fails please let me know and I will try to resolve it asap.
Regards
Nixak
-
Re: Nixaks Sagepay Form Module
Pssst. Update version of Zen Cart is 1.3.9a.
-
Re: Nixaks Sagepay Form Module
lol oh dear ...... I will have to look in to that, thank you kuroi
ps there should'nt be any reason for the updates to effect the module as far as i'm aware.
-
Re: Nixaks Sagepay Form Module
I'm running Zen Cart version 1.3.8a. I took a look at the upgrade instructions and it seems pretty daunting. This is my first time working with Zen Cart, so I'm a little afraid to mess with the primary files.
Is there anything I might try before trying an upgrade?
-
Re: Nixaks Sagepay Form Module
I've re-uploaded the SagePay Form files. Still no change.
Where is the TxType defined in ZenCart? Maybe I have something in ZenCart itself configured wrong.
-
Re: Nixaks Sagepay Form Module
I've tried the Sage Pay payment module in Test Mode and all works okay, but when I set it to Live mode and go to checkout I get the following error message:
--
https://live.sagepay.com/gateway/ser...m-register.vsp
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: 4006 : The TxType requested is not supported on this account.
--
Can anyone help?
-
Re: Nixaks Sagepay Form Module
Hi, sorry about the late reply but i've been at work all day :no:
Quote:
Originally Posted by
apovey
I've tried the Sage Pay payment module in Test Mode and all works okay, but when I set it to Live mode and go to checkout I get the following error message:
--
https://live.sagepay.com/gateway/ser...m-register.vsp
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: 4006 : The TxType requested is not supported on this account.
If I remember correctly, after you do a successful purchase in test mode using the test card details from sagepay, you have to contact sagepay to activate the live account. All the info is in the readme file included in the module.
Quote:
Originally Posted by
KCMP
I've re-uploaded the SagePay Form files. Still no change.
Where is the TxType defined in ZenCart? Maybe I have something in ZenCart itself configured wrong.
In admin/modules/payment you need to click on the sagepay module and then click edit. In there you will find all the settings for the module. Under the box where you enter your encryption password there should be "Transaction Mode" then "Transaction Type" and the module should use the type "payment" by default. Sagepay only offer the other types of payment if you have agreed it with them.
Please ensure that you have entered the correct vendor name and your encryption password supplied to you by sagepay or else the encryption cannot be de-coded by sagepay and the transaction will fail.
Also don't worry about the zen-cart upgrade as this does not affect the module (I have my website running on 1.3.8a with the sagepay module working) but I do recommend you upgrade as soon as you can as all upgrades improve your site's security and fix any bugs that the zen-cart team have found.
I hope this helps both of you but if either you or apovey are unable to fix your problems, please let me know and we will try to find out what has happened.
Regards
Nixak
-
1 Attachment(s)
Re: Nixaks Sagepay Form Module
Strange, I don't see a "Transaction Type" option. There are several text boxes in the SagePay Form settings that are unlabelled. I typed "payment" into the one between "Transaction Mode" and "Transaction Currency," but that didn't seem to have any effect. Here's a screenshot of what I'm talking about:
http://www.zen-cart.com/forum/attach...1&d=1271887799
-
Re: Nixaks Sagepay Form Module
Aha thank you for the picture it should not look like that, it should like this
http://img404.imageshack.us/img404/5...adminpiccy.jpg
I have downloaded the file from zen-cart and it appears to be fine. All I can recommend at this moment is that you remove the module via your admin panel, then delete the files, re-download the module from zen-cart and try a fresh install.
Also are you using any mods especially any that alter the admin side at all?
-
Re: Nixaks Sagepay Form Module
Thanks so much for your help. I uninstalled the module, and then re-installed it, and it seems to work fine now.
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
KCMP
Thanks so much for your help. I uninstalled the module, and then re-installed it, and it seems to work fine now.
Your more then welcome KCMP :D just glad to hear you have it all working :clap::clap:
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
Nixak
Your more then welcome KCMP :D just glad to hear you have it all working :clap::clap:
I can't imagine what could have caused the problem
-
1 Attachment(s)
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
MaryF
If someone could help with adding an if / else statement in the code then we could get the billing info sent to SagePay if it is a download product and there is no delivery address.
Here is the section of code inside the file called includes/modules/payment/sagepay_form.php.
How do I add the statement in the section after this line:
Code:
$plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
In other words, the code must check to see if the customers delivery address OR postcode is empty. If both or any of the delivery fields are empty, it posts the billing address to SagePay instead.
Code:
$plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
$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'] . "&";
Would appreciate come help with this.thanks.
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
-
Re: Nixaks Sagepay Form Module
Oh and I forgot to thank you Nixak for the great module.
If you need any help with testing/developing it further please just let me know.
Regards,
Mark
www.avova.ie
-
Re: Nixaks Sagepay Form Module
Hi avova, I just wanted to ask you about that delivery address problem as I don't sell virtual products so it's a little difficult for me lol.
As I understand it from my store when the customer registers to the store they enter the main address ie the billing address and then when they order they can either have the goods sent to that address or enter a new address. If they do not enter a new delivery address then zen-cart automaticly sends the billing address as the delivery address, so you should not have a problem unless you are using a mod that allows your customers to order without registering to your site.
Is there something different with virtual products? which causes the problem listed above and if so could you give me as much detail as possable so as I can re-code the module to help you all.
Regards
Nixak
-
Re: Nixaks Sagepay Form Module
Yeah no problem.
Basically what happens is with a download/virtual product the entire shipping process is bypassed and $order->delivery[] is left with blank fields.
The code I used to fix the issue is highlighted by code comments in the file I attached in my previous post. (It's at the top of the process_button() function )
All I'm doing here is checking to see if the $order->delivery array is empty and if it is I copy the details from the $order->billing array to it and that keeps SagePay happy.
I hope that clears things up for you.
Regards,
Mark
www.avova.ie
-
Re: Nixaks Sagepay Form Module
Cheers Avova I will update the module with those changes as soon as I can .... the wife has me updating her website at the moment :(
-
Re: Nixaks Sagepay Form Module
No problem at all.
And like I said if you need any help with development/testing just let me know.
Regards,
Mark
www.avova.ie
-
Re: Nixaks Sagepay Form Module
Hi Nixaks!
Thanks for this mod...it installed and worked 1st time!
Just a couple of quick question....is there anywhere that tells me in admin that a payment was authorised or is the only confirmation the email sent from sagepay?
If it's just the email, is there any way of tying the order ID within zen cart to the transaction ID from sagepay? Does the transaction ID get written to the database anywhere?
Also, when a payment is refused the user is returned to the payment screen in Zen Cart. Is there any way to display a message to say the payment was refused?
I am using Zen Cart version 1.3.8a and am still using sagepay in test mode.
Thanks again for the mod...it's really good!! :D
-
Re: Nixaks Sagepay Form Module
Quote:
Originally Posted by
damiantaylor
Hi Nixaks!
Thanks for this mod...it installed and worked 1st time!
Hi damiantaylor, your welcome :D
Quote:
Originally Posted by
damiantaylor
Just a couple of quick question....is there anywhere that tells me in admin that a payment was authorised or is the only confirmation the email sent from sagepay?
At this moment in time it's only via the email from Sage Pay
Quote:
Originally Posted by
damiantaylor
If it's just the email, is there any way of tying the order ID within zen cart to the transaction ID from sagepay? Does the transaction ID get written to the database anywhere?
Oh I hadn't thought of that :blink: .... I will look into this when I have 5 mins
Quote:
Originally Posted by
damiantaylor
Also, when a payment is refused the user is returned to the payment screen in Zen Cart. Is there any way to display a message to say the payment was refused?
I am using Zen Cart version 1.3.8a and am still using sagepay in test mode.
Thanks again for the mod...it's really good!! :D
Again unfortunatly not at this moment, however this is something i'm working on, just the coding for this is extremly difficult (esp as i'm fairly new to coding lol) but this is something my wife has been nagging me about for ages, as I created this module for her site (the one listed in my sig)
I will try to look in to this some more tomorrow as unfortunatly I'm off to work in a minute :yuck:
Hope this helps
Nixak
-
Re: Nixaks Sagepay Form Module
Ah, I've just answered one of my questions....If a card payment gets refused, it doesn't create an order in Zen Cart so if I see an order in Zen Cart, I can assume the card payment was authorised.
I'd love to be able to show error messages from sagepay when the user gets back to the payment screen though.
All I currently get is my URL with &crypt= followed by a long string.
-
Quote:
Originally Posted by
damiantaylor
Ah, I've just answered one of my questions....If a card payment gets refused, it doesn't create an order in Zen Cart so if I see an order in Zen Cart, I can assume the card payment was authorised.
I'd love to be able to show error messages from sagepay when the user gets back to the payment screen though.
All I currently get is my URL with &crypt= followed by a long string.
The reason for the &crypt followed by a long string is because that's sagepay telling you what the problem is, unencrypting the message is the easy part, however getting that to show to the customer and recording that in your database for you to see is another matter lol. I may have thought of a tempory measure to put in place but I'm at work at the moment so it will have to wait untill tomorrow. I will let you know how it goes :)
Regards
Nixak
Posted via Mobile Device
-
Re: Nixaks Sagepay Form Module
Hi all,
I have come up with a tempory way of informing your customers if they have had a problem whilst making a payment :clap:
First off you will need to create an ez page, so go to admin/tools/ez-pages and click the new file button.
Then enter whatever message you want you customers to see. At the top of the ez-page use the following settings
opens new window = no
page is SSL = yes
header = no
sidebox = no
footer = no
TOC = no
Chapter number = leave this as 0
and enter your own page title and click the update button.
~DO NOT put anything in the internal or external URL link~
Now take note of the id number for your new page (it will be listed on the left hand side)
Next go to https://www.yourwebsite.address/index.php?main_page=page&id=ID number (replace the yourwebsite.address and ID number with you details) and you should see your new ez-page, copy the full url.
Last bit :D using a good text editor (such as notepad++) open the file includes/modules/payment/sagepay_form.php and find this line
Code:
$plain .= "FailureURL=" . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true) . "&";
replace the zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true) part with your ez-page url you copied earlier and inclose the url within speech marks, so you should have a line like this
Code:
$plain .= "FailureURL=" . "https://www.yourwebsite.address/index.php?main_page=page&id=ID number" . "&";
Save the file and upload it to where it belongs ( includes/modules/payment/sagepay_form.php) ... your done :clap:
Hope this helps untill I can get time to code the backend of the module
Nixak
-
Re: Nixaks Sagepay Form Module
Thanks Nixak!
I was thinking a temporary fix could be to decrypt the message from the &crypt variable in the URL in file /includes/modules/pages/checkout_payment/header_php.php and add any error messages to the message stack for that page.
I'm not sure if this would work and I haven't had time to test it yet but I'll hopefully get a chance to give it a try tonight.
If not, your fix sound good.
-
Re: Nixaks Sagepay Form Module
Nixak,
I've tried to understand why the error messaging doesn't work but I'm stumped!
I've tried logging points in the php code using firephp and get_error() never seems to fire for some reason.
I've had a look at other similar modules and they don't seem to do much different than this one.
There must be some reason get_error doesn't fire, maybe some variable not set or something?
The strange thing is it works if you redirect to an easy page?
-
Re: Nixaks Sagepay Form Module
Hi Nixak, Me again!
I've done some more investigation and I think this may be a problem with Zen Cart rather than your mod.
I've found a Sage Pay form mod for osCommerce and modified it to work (in a fashion!) with Zen Cart.
When it came back with an error, it did exactly the same thing as your mod does....just has the &crypt string in the URl.
I've tried the same thing with PayPal and although it doesn't go back to the checkout_payment screen (it goes back to the checkout_shipping screen for some reason) it still shows no messages; just &ec_cancel and &token in the URL.
It may be worth asking if get_error() is a Zen Cart bug before you go pulling any more hair out :)
-
Re: Nixaks Sagepay Form Module
I've found some threads that suggest you can't use the URL for passing long strings like payment error messages any more:
http://www.zen-cart.com/forum/showthread.php?t=136174
http://www.zen-cart.com/forum/showthread.php?t=132652
http://www.zen-cart.com/forum/showthread.php?t=113808
The last one suggests using the message stack in the before_process function as in authorizenet.php supplied with Zen Cart.
The only thing I don't understand is, you pass the failureURL to SagePay and they redirect you to the page in question, so how does before_process ever get to fire?
I hope this all helps!
-
Re: 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
-
Re: Nixaks Sagepay Form Module
Hi
Has anyone tried this module with version 1.3.9d of ZenCart?
Cheers
Al