Jump to content
Sign in to follow this  
Paul_w

[Contribution] Protx Direct (Payment module)- for osC MS1

Recommended Posts

Paul

Thanks for this. I will be installing it in the next few days. A couple of questions:

 

There are several pre-requisites you need to use Protx direct server, this contribution uses php cURL,  

This Protx direct server contribution works fine for me, however I haven't written it specifically to be given out as a contribution. So first off, using this means you will overwrite your current (osC default) credit card payment module - cc.php. If you really need to have that as well as Protx? you could change all the variable names in these files or in the other cc.php files, however if youre using Protx I guess you won't need to be storing CC details in the DB...

 

First what is php cURL? I've searched to find help on this without success. Even a pointer to some info would be helpful.

Second I thought the difference between Protx direct and Protx form is that Direct doesn't take the punter to the processors website wheras Form does?

 

On that basis wouldn't CC details be held in the database?

 

Or are you saying you are choosing not to hold that info and that it has nothing to do with the processing method?

 

When testing, if I test just the checkout code is there an easy way to disable the protx bit or should I not add it until I am happy that the cart works ok? Any tips on testing appreciated as I haven't been through this yet

 

 

Looking forward to getting this contrib up and running

Share this post


Link to post
Share on other sites
Paul

Thanks for this.  I will be installing it in the next few days.  A couple of questions:

 

First what is php cURL?  I've searched to find help on this without success.  Even a pointer to some info would be helpful.

 

From the php manual:

 

"libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading......."

 

Best way to check for cURL is to run phpinfo() on your site/server, if you see cURL listed than you have it available, however it seems to be the case that cURL is sometimes built without SSL support, I'm not sure if there is an easy way of testing for SSL support. The way I did this was to write a short php/cURL script to connect to an https page and use the curl_error() function to find out that it didn't support https (SSL not supported) this meant a recompile of PHP and cURL on my server (I have my own dedicated server). With luck most people would have this available already.....

 

Second I thought the difference between Protx direct and Protx form is that Direct doesn't take the punter to the processors website wheras Form does?    

 

On that basis wouldn't CC details be held in the database?    

 

Or are you saying you are choosing not to hold that info and that it has nothing to do with the processing method?

Youre right in that Protx direct means that the transaction is completed entirely on your own server, and of course this means that the customer has to enter all CC info on your site which you then pass through to Protx, it is entirely possible to store CC details in the DB however I am not going to be doing this and personally I would rather not take the risk, in the the readme.txt I wrote, there are instructions on 1 line to change to prevent the CC number from being entered into the DB. Once the Protx transaction is completed all the return info from Protx is stored in the DB and these authorisation/security numbers can be used again to repeat or release deferred payments, so there really is no need to run the risk of holding all customers CC info in the database.

 

When testing, if I test just the checkout code is there an easy way to disable the protx bit or should I not add it until I am happy that the cart works ok?  Any tips on testing appreciated as I haven't been through this yet

 

Sorry no, I don't think there is a simple way to disable just the protx payment part. If you know a little php you could go into the code and comment out certain lines that would stop the Protx request/response part from functioning.

 

HTH

Paul

Share this post


Link to post
Share on other sites

thought about doing this a long time ago but never got around to doing it. I think I will take a look at what you have done as I want to create a way to authorize the transaction when I am ready to ship the order rather than at the point of entry by the customer.

Share this post


Link to post
Share on other sites
thought about doing this a long time ago but never got around to doing it. I think I will take a look at what you have done as I want to create a way to authorize the transaction when I am ready to ship the order rather than at the point of entry by the customer.

 

This is exactly the way that I'm using Protx, you can use the contribution to take 'PREAUTH' Transactions which don't actually remove any money from the customers account, the transaction is authorised, then later using the Protx details received and stored in the DB by the original preauth transaction you can make a further 'REPEAT' payment when shipping the goods, this will then remove the money from the customers account.

 

This added functionality would need to be scripted separately from the contribution I have written. With Protx you need to be able to demonstrate an ability to make refunds also, so added functionality is needed for this. However all this functionality is beyond the scope of the contribution, which simply takes and processes single payments but does allow you to set which type of payment request you want to make.

Share this post


Link to post
Share on other sites

Thanks, I will take a closer look.

 

A couple of questions you may know the answer to. If a preauth is performed does it last for just 24 hours ? Are you charged 2 transaction fees 1 for preauth onw for actual transaction ?

Share this post


Link to post
Share on other sites
Thanks, I will take a closer look.

 

A couple of questions you may know the answer to. If a preauth is performed does it last for just 24 hours ? Are you charged 2 transaction fees 1 for preauth onw for actual transaction ?

 

A Preauth doesn't place any 'shadow' at all on the users card account, basically it authorises the card, charges the amount and then immediately reverses the transaction. You can use a 'Deferred' payment type to hold the amount for 24 hours though.

 

There are pros & cons to both methods:

 

With deferred payments, when you actually process/authorise the charge, no further authorisation is made on the card, so if the 24 hr period has expired and the cardholder has spent up to their credit limit you would not receive any money!

 

With Preauth, when you follow up the transaction with a 'Repeat' payment the card is re-validated/Authorised via the information stored from the original Preauth, so if there is no money available the transaction would fail.

 

Protx recommend using the Preath method for merchants who want to take payment upon shipping goods rather than at the time of sale. I have also decided to use this method myself.

 

I don't yet know whether there are 2 charges or a single charge, I shall be in touch with Protx on the phone again in the next day or so, so will pass the info on when I know. Whatever the case, you are only talking an extra 5p anyway!

Share this post


Link to post
Share on other sites

I know it's only 5p but as they say "take care of the pennies".

 

The preauth does seem like a good option as it lets you clear most problems immidiatley rather than having to go back to the customer later to explain that their card details are incorrect or whatever.

Share this post


Link to post
Share on other sites

Paul, fantastic work on this buddy - one of us was going to have to do it, but you beat me to it! ;)

 

I'm now having to get my host to rebuild the server with phpcURL/SSL support :P They love me, they do!


Regards, Jay.

Share this post


Link to post
Share on other sites
Paul, fantastic work on this buddy - one of us was going to have to do it, but you beat me to it! ;)

 

 

You're welcome!

 

One important point concerning the contribution though, I realise now that I have uploaded the contribution with it set up to make transactions using the Protx test server, as opposed to the live server.

 

I will not be switching over to the Protx live server myself until sometime early/middle of next week, so until then I have no idea what the protx live server url is. If someone knows the live server url I will update the contribution to use that and/or provide instructions on the one line to change in the module to switch between test/live protx server.

 

Failing anybody providing the url I'll have to leave it until next week before updating the contribution.

Share this post


Link to post
Share on other sites

I've just uploaded a small update to this contribution as I realised there was a broken pop-up window help link for the CVV number on the checkout_payment.php page, this is now fixed.

Share this post


Link to post
Share on other sites

Paul - as a sidenote to your post. I think it would probably be better to supply the contribution as setup for the test server, giving clear instructions on the changes required to switch over to their live server. Just my tuppence!


Regards, Jay.

Share this post


Link to post
Share on other sites

Hello,

 

Ok, I've got this mod installed and working on my test server, one thing though, how do you process refunds !?

 

I notice the code puts the data into a refunds table, but I can't see any code to process this!?

 

Can anyone help?!

 

Thanks

 

John

Share this post


Link to post
Share on other sites
Did you find out from Protx if there are 2 transaction charges for uing PreAuth ?

 

I did ask Protx, and the answer was that you only get charged for the actual final transaction itself.

 

Ok, I've got this mod installed and working on my test server, one thing though, how do you process refunds !?  

 

I notice the code puts the data into a refunds table, but I can't see any code to process this!?  

 

Can anyone help?!

 

The mod I wrote processes the payments only and stores all the related transaction information in the DB. You will need to write a separate script to process any further transactions using this information including processing refunds.

 

Perhaps somebody else will release a separate contribution to provide this additional functionality for Protx direct. The scripts I'm using are not portable at all as they are written/hard-coded to my specific requirements.

Share this post


Link to post
Share on other sites

When using this cool mod everything works absolutely fine but then when i go to check the transaction has gone through to protx on the "For Test Reports" option, it never shows anything.

 

It's weird it's like the mod is working but the info is not getting sent. I have php curl support with ssl, and i'm currently on the tester module side of things.

 

Anyone else experienced this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×