Jump to content

[MODULE] Protx direct (VSP Direct) - on site payment


Recommended Posts

VSP (protx) Direct Integration Module
This is (as far as i know) the only on-site payment system for prestashop... no more nasty off-site systems... or being redirected.... When you use this module, people will never leave your site throughout the payment process.


10th June 2009 - Bug fix release
Yet another couple of bug fixes.
It's still (yes STILL) marked as the same version number. Two bug fixes don't really count as much.

Orders over £1,000 now display correctly in the administration area.
Upgraded to work with the latest svn build as of 20 mins ago (yes this includes the latest downloadable beta).

YOU MUST HAVE A VALID SSL CERTIFICATE
This basically means https:// instead of http they cost about 40$ and means people's credit card details won't get stolen.

Installation
You must enable ssl using the option under your back office -> preferences -> enable ssl

Besides that this installs the same as any other payment module.
Download it using the file download link at the bottom of the page.
Unzip and then upload the "vspdirect" folder into your /modules directory.
You must then go to the modules page in your back office. From there, press the install button next to the "protx direct" module.
You must then configure the module (click the configure link).

"vendor name" this should be your full protx vendor name.

"vendor email" This should be the email address you would like payment notification emails to go to.

"Protx TxType" This has only been tested in the default "PAYMENT" mode. If you don't know what this is, don't change it!

"Protx currency" This is the currency you would like protx to process your payments. Only GBP (British pounds) has been tested. However, i'm sure other currencies work fine.

"Protx CV2" Setting this to "yes" means a valid C.VV2 (the 3/4 security numbers) on your card must be correct for the payment to go through. Having this enabled is highly recommended.

"Protx 3D Secure" Another way of saying 3D Auth... Yes that's right... i did 3D auth support.... It has been tested and works fully :)

"Validate Billing Address" Having this enabled means that whatever the customer entered as their billing (invoice) address will be matched against the address registered with their bank.

"Payment Mode" This module works in 3 modes. You must have your account active and set up in the mode you specify.
To receive valid payments. You must set this to "live".

You must also add your server's IP address into the allowed list in your protx account before you are able to accept orders.



Disclaimer

I do not work for or with protx in any form. This is released as is, and comes with no guarantee or support contract of any kind.
If you would like support or have any questions or comments, please post in this thread. I got some very good feedback and questions from my protx form module but most of them were emailed so nobody else got to see them.

Integration with prestashop was painful, getting support from the prestashop community was almost non-existent... As was getting support from protx themselves.
Thanks for downloading!


THIS MODULE IS PROTX (VSP) DIRECT ONLY
This means it does not include vsp server or vsp form.

I have written a vsp form module which has been very well tested and can be downloaded here:
http://www.prestashop.com/forums/viewthread/7673/modules/module_protx_payment_gateway_v2/

Requirements
This has been tested on a standard installation of PHP5 and MYSQL4

YOU MUST HAVE CURL INSTALLED AND WORKING
This module makes use of the php5 curl functions. Without them... interaction with the protx server is not possible (i think curl now comes with php5 as standard).

YOU MUST HAVE A VALID SSL CERTIFICATE
To process live transactions protx requires a valid (not self signed) SSL certificate of at least 128bit. You can now pick these up for about $40 so it's not going to break the bank....
3D Secure payments definitely screw up without one... and i wouldn't like to process card details without one....

You must also have a protx account (duh)



What this module does not do
This module does not automatically issue refunds when the order status is changed. Nor does it have the ability to charge defered payments.... I have thought long and hard about this and may release instructions on how to modify your copy of prestashop to allow this to happen. Until then... keep emailing the prestashop staff. Prestashop currently does not support this, please direct all comments about this towards them and keep it out of this thread....

Thanks
A thanks goes out to everyone who nagged me to get this finished and to everyone still releasing free modules.

I have seen some people linking to paid modules here and i don't like it... If you see a paid module, PM me and i will try and make a free and better version.
Prestashop needs more free modules to live... Or we'll all go back to using OScommerce (YUCK!)
Thanks to everyone who downloads this module.
And thanks to my client. For allowing me to release for free, code that i worked on in time they paid me for.

Lastly a thanks goes out to the prestashop team for giving us hope.


Plans for Sagepay

Over the next year or so, protx will be migrating to sagePay. This will mean that anyone using this module will have to upgrade in around a years time.

I looked into just doing a URL change for some of my customers and found that they have changed the bloody protocol, and so it will require more investigation.
I have literally spent 5 seconds looking at this... You might even just be able to change the version number to match and it will work... I haven't looked at the documentation.

Expect a sagePay module to appear soon.
This will include the new features that have been suggested in this thread as well as many more!

vspdirect.zip

Share this post


Link to post
Share on other sites
VSP (protx) Direct Integration Module



I have seen some people linking to paid modules here and i don't like it... If you see a paid module, PM me and i will try and make a free and better version.
Prestashop needs more free modules to live... Or we'll all go back to using OScommerce (YUCK!)
Thanks to everyone who downloads this module.
And thanks to my client. For allowing me to release for free, code that i worked on in time they paid me for.

Lastly a thanks goes out to the prestashop team for giving us hope.



Thank you for the module. I am very appreciated it. Can you make a paypal pro for the community? I think it is what a lot of people want...Just a suggestion...Thanks.

Share this post


Link to post
Share on other sites

Is that the paypal account where you pay £20 a month and get on-site payment?

If so, you still need a internet merchant number and protx direct is the same price....

Although i'm not saying i'll never make one :-)

EDIT:
Just remembered a bit about paypal pro... Even if i don't make one... it might help someone else...

There are two versions of website payments pro. One for the UK and one for America. Both a totally seperate and have many small differences (helpful huh!)

I have done a small ammount of work in the past on the UK version. It uses a system called payflow, and can be a total pain... but i can't see why it couldn't work under prestashop using a similar idea to my protx direct module.

The American one however, i know almost nothing about. If i made a module for the UK one, it wouldn't work under the American system and i have no way of testing or developing an American version as all my customers are in the UK and i have no access to an American account...

Share this post


Link to post
Share on other sites

I really think that paypal is not the way to go when you have a business. The fees are higher than merchant accounts and because its not a merchant account you do not have any control over it. Say someone charges back an item you sent them, paypal charge you for this and you don't have any come back. With a real merchant account you do. With a merchant account you a verify the customer in full, unlike paypal lets any con man on it.

Share this post


Link to post
Share on other sites

I'll give the American one a go over the next few weeks.

Atleast then both US and UK prestashop users will have their own way of taking payments on-site.


If there's anything you'd like changed from my protx direct module (in terms of functionality) please let me know in the new paypal thread:
http://www.prestashop.com/forums/viewthread/16251/modules/discussion_paypal_web_payments_pro_wpp__american/

I would like to keep this thread clean for the protx direct module discussion.

Share this post


Link to post
Share on other sites

You could try:
changing line 19 of vspdirect.php from:

$this->displayName = $this->l('Protx Direct');



to

$this->displayName = $this->l('Credit/Debit Card');

Share this post


Link to post
Share on other sites

Just to let you know. Version 0.2 can be downloaded in my first post.
http://www.prestashop.com/forums/viewthread/16173/modules/module_protx_direct_vsp_direct__on_site_payment/

This fixes the issue above as well as some problems with 3D Secure (3d auth). If you use 3d auth. UPGRADE RIGHT NOW! some of these issues are very important and without upgrading could mean people are completing orders without the transaction going through completely!

Share this post


Link to post
Share on other sites

You have two files to download:-

vspdirect.zip (File Size: 13KB - Downloads: 35)
vspdirect-0.2.zip (File Size: 14KB - Downloads: 3)

Do I need both or one of these files?

With regard to the certificate I believe I need to ask my host company to activate a certificate and they asked my what url I wanted it activated on. The charge £70pa !!!!!

Share this post


Link to post
Share on other sites

Hi Paul, i sent you a PM regarding your Email (your email address wasn't working).

You should download: vspdirect-0.2.zip

£70 is not unusual, but there are cheaper providers. These include companies such as comodo Their instant SSL is much less than £70.

Share this post


Link to post
Share on other sites

Getting this error

Parse error: syntax error, unexpected T_ELSE in /homepages/39/modules/vspdirect/3DCallback.php on line 62



Went through password thing, then dragged for ages and then showed error.

Share this post


Link to post
Share on other sites

Im not sure its right as it hangs for 30 secs and then displays a load of errors and quickly redirects to order id last part. In the admin panel, does not show any transaction ids or info.

Just shows this:
(2009-04-23 15:32:35) [Private]: 3d auth info:
Status: OK
vendor tx code = 49f0tty7bf49f6ff6c4357155ff69

Share this post


Link to post
Share on other sites

Check your protx account.

If you have have your error level set to E_ALL you might see some notices. but no errors.

if you turn off 3D auth in your protx account and it's still doing it. Then change it in the module configuration.

Share this post


Link to post
Share on other sites

Right ive uploaded latest version of your module, enabled 3d secure on protx. I go through checkout fine, add card details, 3d secure comes up, enter password, hangs, get error (see attachment, website name covered for privacy), order is processed, go to order in admin panel and shows:

(2009-04-23 15:56:26) [Private]:
Status: OK
Status Detail: 0000 : The Authorisation was Successful.

vendor tx code = 49f0817cafe3742fdggfdfdgfgd953040

Used to show:

(2009-04-20 13:04:23) [Private]:
Status: OK
Status Detail: 0000 : The Authorisation was Successful.
VPSTxID: 772BA3TCE-F189-DD5FD857-B1F8-B8CB4FD436DB3778
AVSCV2: ALL MATCH
AddressResult: MATCHED
PostCodeResult: MATCHED
CV2Result: MATCHED

7153_3OdOOJLrszwvchwe8ceP_t

Share this post


Link to post
Share on other sites

ok .... none of those files related to my module... If you check the paths... it's nothing to do with my code.

These are because you have your error level set too high in your php.ini (they are "notices" not error's).


The "hanging" is the transaction being processed by the bank (not a fat lot i can do about that)... I thought about creating a "please wait" image. But the image would take longer to download than to just redirect you on.

If you enable 3D auth, you won't get
"AVSCV2: ALL MATCH
AddressResult: MATCHED
PostCodeResult: MATCHED
CV2Result: MATCHED"

This is because i don't get this information from protx... you can however, see it in your protx account.

Share this post


Link to post
Share on other sites
  • 3 weeks later...

Does anyone have experience with 3d secure, does it put clients off?
it is getting popular so slowly especially after maestro refused to participate with online payments without 3d secure (at least in the uk).

Any stats or views if 3d secure would make client leave at the payment page?

Share this post


Link to post
Share on other sites

Our clients will go either way.

Some swear by 3d auth, others hate it. Alot of younger people, especially in the UK (who don't have credit cards) only use maestro. So if that's your audience then definately enable it. Older people however, will get put off by 3d auth and leave the site.

You've really got to look at what your target audience wants, perhaps invest in some time looking at your logs and analytics stats to see if 3d auth is putting people off.

What you don't want to do, is switch 3d auth on without notifying customers (perhaps display a message on the site). Repeat customers will find this new box, asking for details they didn't previously need ... there really isn't a beter way than that to put people off ordering.

Share this post


Link to post
Share on other sites

I know that in the oscommerce protx direct module you can enable and disable 3d secure on a per card type basis personallyi think this is the way to go, On sites that we have running osc generally we only enable on maestro cards




regards


Chris

Share this post


Link to post
Share on other sites

That.... is a bloody brilliant idea!

My next release will definately have that in!

It's a total pain in the arse for me to add, but solves the problem perfectly.

Share this post


Link to post
Share on other sites

Elachys,

I noticed that when you are on the protx summary page after the credit card entry, all the info is passed to protx correctly appart from the tax on shipping.
attached is a screenshot, not big deal but will look better is all figures were in the right places :down:



to add to the previous suggestion about adding 3d per card basis, can be as well per range based, like to have it turned on on big transactions.

Share this post


Link to post
Share on other sites

I'm sandbox testing PrestaShop 1.2 (alpha1) with the Protx Direct module and have encountered the following error.
During the checkout process, immediately after clicking "Pay on site with Protx Direct" the next page comes up with the following error at the top:
Notice: Undefined variable: b in www/xxxxxxxx/xxxxx/modules/vspdirect/form.php on line 316

I had a look at form.php, line 316. and b is a rather innocuous variable. I can't imagine that it is undefined or everyone would be having this bug. Have I set something up wrong? Any ideas where it is coming from?

Thanks, R

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Have tested the protx module on the latest svn version of protx and it appears to working fine, apart from protx complaining about the length of th state field being to long, truncated the state field to 3 letters but this made no difference, so in the end just commented out the state billing and address entrys, and the transaction now completes, Will look into what protx expects to see in the state field later this week

This is an excellent module and I would like to thank elachys for releasing it .

Now I would like to suggest some mods for the next version
1, card types that are accepted to be selectable in the configuration not hardcoded into the form
2. as mentioned before 3d secure selecable on a per card type basis
3. the start date field should only appear on the users checkout for if required.

some of the card types need renaming such as switch

Think thats it,

I plan to start working on these mods early next month, and will post the mods as they are completed

Share this post


Link to post
Share on other sites

I have a strange problem. When we have orders over a £1000 for some reason it shows that the customer has only paid £1.00 when the full amount has been taken from their CC. Any ideas why?

Cheers

Rich

Share this post


Link to post
Share on other sites

Protx.com became Sagepay.com a while back and I've been through their forums to see what's happening.
I'm setting up Prestashop for a client here in the UK and he wants to use Protx.
Since this module only works with Protx Direct, it was a simple choice a few months back when we began to
discuss this...but since there is no Protx Direct the same way as it used to be, I was wondering if the new Sage Pay Go
is the same thing?

And will it still work with this module?
Obviously there's been some changes where the domain "protx.com" was included in paths to servers etc.

Would be very grateful for a reply :)


Christa

Share this post


Link to post
Share on other sites

we are using this module and have not updated anything apart from a few changes that we made to the way the checkout is displayed have not altered the protx server paths, everything is processing fine



regards



chris

Share this post


Link to post
Share on other sites
  • 3 weeks later...

Hey, As the mastercard and visa are clamping down on websites that are not 3d secured and under there terms, can fine you I think £10,000. Ive just enabled 3d secure and if you cancel the 3d secure password page I get this error: "your Bank Error'd during 3D authentication". Can you help me here.

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Hey elachys :)

I seem to be having problems with the submit button (make a payment), it just says that form.php is not found... it appears to be looking for "domain.com/form.php", instead of "domain.com/modules/vspdirect/form.php"(from what I can see)....

thats just a guess as I can only find form.php inside your module... any extra info / help would be greatly received...!

thanks again

Share this post


Link to post
Share on other sites
  • 5 weeks later...

I've just read your entire first post and wanted to thankyou for your efforts! I was about to jump ship with presta because of lack of gateway modules (which i still can't understand) but was linked to your project and i'm really glad i can stay as i really like presta!

I eagerly await your sagepay version, so thanks again!

I also agree with you when you say modules should be free (or donationware)! if they don't, this "free" cart won't be free anymore. I saw a website that sells modules and saw a newsletter module for 45 euros! a "email customer when product is back in stock" module for 35 euros and a feedback module for 35 euros again! i couldn't believe my eyes. Over 100 euros for 3 basic modules that most carts have ready available!
I understand that programmers used their skills and time to make them, but that's way overpriced and a big turn off to potential presta users. Donationware is the way forward to expand this type of community, programmers will still get rewarded based on how good their module is and how much people think they're worth, and people will get to reward them as much (or little) as they want. Win - Win.

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi there, I'm hoping you can help.

I have installed VSP direct module, and it's great, thanks very much.

However, I'm a little worried about the URL that is displayed in the browser address bar - domain.com/modules/vspdirect/form.php - could it be a bit of a security issue?

I thought about using a rewrite URL script in the .htaccess file but I don't know how to go about it. Would anyone have any ideas?

I'd like it to not read like it does at the moment, for example, domain.com/modules/vspdirect/form.php , instead make it read like the URL for the order process before entering Sagepay, so for example domain.com/order.php.

Any help would be very much appreciated. Cheers!

Share this post


Link to post
Share on other sites

Hi guys, I've got another problem.

When you click the protx button, it takes you to the payment form, which is located at domain.tld/modules/vspdirect/form.php

When I click 'make payment', it takes me to domain.tld/form.php, which doesn't exist.

Does anyone know what's wrong? Any help would be very much appreciated!

Share this post


Link to post
Share on other sites
  • 3 weeks later...

I'm trying to use the module, but everytime I try to use it I get this error message

3130 : The BillingState value is too long.

What do I do? I have tried to make them shorter (even down to something like war for warwickshire) no joy there. Any ideas??

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi,

Thanks for the very useful module. I have been trying to adapt it to use with SagePay, which (as far as I know) uses largely the same protocol, though possibly updated. There seems to be some talk around the web of the protx URLs stopping working at some stage.

I have replaced the logo and all the "ProtX" strings with "SagePay", and have replaced the various payment URLs in vpsdirect.php as follows:


   case "live":
 $strAbortURL="https://live.sagepay.com/gateway/service/abort.vsp";
 $strAuthoriseURL="https://live.sagepay.com/gateway/service/authorise.vsp";
 $strCancelURL="https://live.sagepay.com/gateway/service/cancel.vsp";
 $strPurchaseURL="https://live.sagepay.com/gateway/service/vspdirect-register.vsp";
 $strRefundURL="https://live.sagepay.com/gateway/service/refund.vsp";
 $strReleaseURL="https://live.sagepay.com/gateway/service/release.vsp";
 $strRepeatURL="https://live.sagepay.com/gateway/service/repeat.vsp";
 $strVoidURL="https://live.sagepay.com/gateway/service/void.vsp";
 $strVSPDirect3DCallbackPage="https://live.sagepay.com/gateway/service/direct3dcallback.vsp";
   break;

   case "test":
 $strAbortURL="https://test.sagepay.com/gateway/service/abort.vsp";
 $strAuthoriseURL="https://test.sagepay.com/gateway/service/authorise.vsp";
 $strCancelURL="https://test.sagepay.com/gateway/service/cancel.vsp";
 $strPurchaseURL="https://test.sagepay.com/gateway/service/vspdirect-register.vsp";
 $strRefundURL="https://test.sagepay.com/gateway/service/refund.vsp";
 $strReleaseURL="https://test.sagepay.com/gateway/service/release.vsp";
 $strRepeatURL="https://test.sagepay.com/gateway/service/repeat.vsp";
 $strVoidURL="https://test.sagepay.com/gateway/service/void.vsp";
 $strVSPDirect3DCallbackPage="https://test.sagepay.com/gateway/service/direct3dcallback.vsp";
   break;

   default:
 $strAbortURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorAbortTx";
 $strAuthoriseURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorAuthoriseTx";
 $strCancelURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorCancelTx";
 $strPurchaseURL="https://test.sagepay.com/Simulator/VSPDirectGateway.asp";
 $strRefundURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorRefundTx";
 $strReleaseURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorReleaseTx";
 $strRepeatURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorRepeatTx";
 $strVoidURL="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorVoidTx";
 $strVSPDirect3DCallbackPage="https://test.sagepay.com/Simulator/VSPDirectCallback.asp";
   break;



These are URLs taken from the migration PDF linked here http://protx.gtml1.com/Protxlz//lz.aspx?p1=0533882S392&p=0, though there were a few missing, which I have found from assorted pages via Google. I think some of the pages and methods may now be deprecated, hence not appearing in the migration document. I think all the URLs follow the same pattern.

Initial tests with the simulator are encouraging, and I think it largely works, although I suspect something odd might be happening with 3DAuth - not totally sure if that's working right...

Is anyone else running this module against the SagePay URLs? Any trip wires to watch out for?
I'd appreciate a sanity check on this one as I haven't worked with prestashop or sagepay before...

cheers,
dmar

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 1 month later...

Hi
I have set up the protex VSP on my prestashop like 2~3 months ago and it was ok! I think by the new year my website IP has changed and it courppted my payment gate!

when i want to check out in my website an error aprears which is:
"4020 : Information received from an Invalid IP address."
I have added the new IP address to mysagepay account
but still problem exist

Please help me to solve the problem


Thank you

Share this post


Link to post
Share on other sites

have you tried contacting your host and asking if there's been an IP change?

maybe try contacting sage (their helpline are actually quite good too) and asking if they can check the account, and make sure the IPs tie up and are updated and correct?

Share this post


Link to post
Share on other sites
  • 1 month later...

Hello. Can anyone clarify for me please if this module works correctly with Sagepay, and if so, is it expected to continue to do so in the future? I have a client who would very much prefer on-site payments and this would seem to be ideal if it works.
Thanks

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More