Hi, are there any plans to port this to D6?
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | uc_paypoint_d6.patch | 8.04 KB | Pete B |
| #20 | uc_paypoint.zip | 7.78 KB | merch |
| #11 | uc_paypoint-merch.zip | 7.75 KB | merch |
| #3 | uc_paypoint_D6.zip | 28.85 KB | onewayticket |
| #2 | uc_paypoint_D6.zip | 28.86 KB | onewayticket |
Comments
Comment #1
onewayticket commentedI've managed to use the 'Coder' module to make all of the critical changes to the UC PayPoint module. There are still some minor code cleanups that Coder recommended - 'string concatenation should be formatted with a space separating the operators (dot .)' - but these are mainly associated with the on-screen messages the user gets when payment is being processed. I thought I should leave them in because they seemed to work when the original creator wrote the script.
I haven't tested this live yet - I'm still awaiting my PayPoint account settings! Please let me know your results - that's all I ask for.
If psynaptic can look through the code quickly and test it, that would be a great help. I'm hoping that the 'Implementation of hook_menu()' has been converted correctly. If there are any problems with it, I'm assuming it's the 'if()' statement. This used to be 'if($may_cache)' beforehand, so I removed the '$may_cache' from the line and Coder was happy with it.
Onewayticket
Comment #2
onewayticket commentedSorry, please use this file not the other one I attached. It seems that '$may_cache' still needs to be present for the script to not botch up your site.
Comment #3
onewayticket commentedThis version removes the whole 'if ($may_cache) {' line. I'm hoping this is the best version as it validates in Coder again now.
Here's how that whole block now looks
Comment #4
psynaptic commentedHas anyone tested this?
Comment #5
psynaptic commentedThanks for your efforts. I fully intend to make a Drupal 6 port of this module, I just don't have the time right now to get deeply into this. If you good people could test it fully it would give me more confidence to commit it. I can't commit something that's not even been tested.
Comment #6
bloke_zero commentedAh, catch 22, my client went with world pay. Next time I have a paypoint client I'll jump in, but till then I have no account details to test with.
thanks for the conversion.
Comment #7
merch commentedIm attempting to use the converted paypoint module but when I try and review my order I get the following message.
"An illegal choice has been detected. Please contact the site administrator."
Note:Im getting this error using the default settings for the module I have yet to get the propper details of the paypoint account from the client.
Fix: theres an issue with the title tag using the variable "$cards"
Comment #8
merch commentedGot the module somewhat working details are sent to paypoint.net and transactions are processed im now faced with the issues of returning from paypoint back to my drupal site.
This is what paypoint returns when I "pay" im currently running off a local host so im assuming this may be the problem. Tommorow I will attempt to get my site online and test out the payment module once again
Comment #9
onewayticket commented'merch' I'm also getting this problem with the original script running on Drupal 5. When I try to use the link specified, my drupal site brings up just an un-themed page with the following text:
"We were unable to process your payment. Please verify your details and try again. If the problem persists, please contact us. Many thanks."
Have you managed to work out what the problem is? If so, please let me know your work-around. Thanks.
Comment #10
onewayticket commentedActually I'm getting a 401 message now from the PayPoint / Secpay server. That must mean that we're denied access. Could this be something to do with the user_access part of the UC_PayPoint script? I'm running a membership site if anyone can help?
Comment #11
merch commentedHi onewayticket,
Just to let you know where im coming from. I'm new to drupal, ubercart and pritty much php.
I spent a few days tinkering aroud with the module code (I am led to belive that people aren't ment to change module code)
However In doing so im please to announce I was able to get the module working! I've changed a small amount of code with help from one of the core payment modules (2checkout i think). My site which im developing for a client is up online and im currently using the test account provided by secpay and entered these account details on the module set up.
PayPoint merchant ID: secpay
Remote password: secpay
Digest key: secpay
Changes ive made - sorry if my terminolgy is incorrect. (all changes were made in notepad - yes I know thats not ideal guess im just used to using it for html)
Ive added a finalize "page" to the hook_menu
I added a google analytics hook
I changed the 'title' to "paypoint" using the variable $cards was causing the "An illegal choice has been detected. Please contact the site administrator." message i was expericence in message 7 above.
In the function "uc_paypoint_complete i have commented out the last 2 lines of the case 'A' in the switch statment
and at the bottom of this function i have replaced the last 4 lines
with the following
and at the bottom of the module i have added the uc_paypoint_finalize function
Thats about it Ill keep checking here see if i can be of any more help.
Comment #12
onewayticket commentedThanks for the information merch. Is this for Drupal 5 or 6? I've actually just managed to work out why in Drupal 5 I was getting the 401 error - my own fault, I'd password protected my site! Once that was removed the process worked. I too am using an active SecPay / PayPoint account but only processing orders in TEST mode.
I noticed in your code that you've added a 'finalize' page. Is this to load a template matching your site for the completed order page? If so that's great, as it looks terrible just having black text on a white background, which is what I'm getting at the moment.
Like the look of the Google Analytics code too. Would be very handy. I hope this works for both Drupal 5 & 6, as I've had to go back to 5 due to the lack of upgraded modules for 6. psynaptic's original D5 version was claiming to be working so I thought I'd better stick with that.
Comment #13
merch commentedIve been working on drupal 6. the finalize page Is a themed page to display the output text of the completed order. (stopping that awful black text on white background) Ive yet to test the google code for my site so not sure if its working yet.
If you do change to Drupal 6 let me know and ill help anyway I can. If not goodluck with getting the module working on 5 :D
Comment #14
onewayticket commentedYes, I'm struggling with the horrible confirmation black text on white background. I can't get your changes to work though in D5 and I'm unsure that this finalise page will work with creating roles once the user has paid. Isn't there a way that we can just call the main site template into the confirmation page, so that it still integrates fully with Ubercart? Could anyone suggest a way of doing this?
I've looked at the protx direct gateway module (D5) and there is a piece of code at the top of the module which calls a CSS file to style the pages. Maybe changing that code could theme the confirmation? Here's the code:
Comment #15
bloke_zero commentedYou might want to look at this: http://drupal.org/node/369096
Where a themed page is returned for the final page in a worldpay transaction - might solve your problems viz black and white unthemed page
Comment #16
chrispeat commentedHi,
I am pretty new to Drupal, although not to PHP and payment gateways and have used Secpay in the past. I am just testing out the interface as-is at present and have a few Q's:
1. What is the remote password?
(It says "Enter the remote password that you entered into your account on the PayPoint site" which would leave me to believe its the main password for Secpay... but this surely isnt correct as the interface would have no requirement for it?)
2. Is the module any further down the track, are there any areas anyone would like me to look through as I need to get this module working?
Any and all hints and tips are very gratefully recieved!
Many thanks
Chris
Comment #17
marc.groth commentedHi there,
Firstly I'd like to thank you so much for all the work you've put into this module. It's really great and I've almost got it working 100%!!
@merch: You mentioned something about getting the "Template not Found" error being because the site wasn't live. Can you confirm that that was in fact the case? I am getting the same error and am currently working on my localhost. I'm unable to put it live just yet to test, though have noticed that if I put in any live URL (i.e. http://www.bbc.co.uk) for the callback it seems to redirect successfully. Is this because I'm working on localhost then?
@chrispeat
1) The remote password is the one you entered when you log into the SecPay website. Once logged in if you click on "Account" (top nav) and then "Remote Passwords" (left nav) you should be able to enter it in there (selecting "Remote" from the drop down)... I'm not 100% sure, but if you haven't followed these steps before then I doubt you have one already and will need to set one up. Try entering a new one anyway and then linking that on Drupal. It should work :) Remember (I fell short here for some time and it took me a while to figure out) that the password you enter into Drupal is case sensitive!!!
2) I'd like to know this too... It seems like this module could be used widely and I am very willing to be a tester (and even help with code where I can)...
Hoping to hear back from someone soon!! :)
Comment #18
chrispeat commentedHi Marc Groth,
Thanks for the heads up, I'll have a poke around on Monday and hopefully get somewhere more meaningful. I also managed to get the module up and running and it seems to work, the last part to test is the callback and full testing that its handing over all the data... as these sorts of things should.
It does look pretty good and I'll be trying hard in the next few days to get it working so I'm happy to share anything back into the community.
Let me know how you get on and I look forward to getting this going.
Cheers everyone!
Chris
Comment #19
merch commentedNot checked here for any progress for some time.
@marc.groth I think moving the site onto a proper webserver helped with the issue you mentioned was a long while back.
I can however say that The site I was working on is just about to go live (long time developing being my first big drupal site).
Yesterday while checking things we tried a live paypoint transaction with a debit card, this was a 100% success paypoint happily took my money and then i was able to refund it (using the paypoint site) :)
I dont think my module has changed since I posted it (post 11) i will check tho and get back to you when i can.
The module will post the sale to paypoint and port back to your site on a page with the checkout complete messages.
thanks to psynaptic for the orignal module and onewayticket for his D6 conversion
Comment #20
merch commentedI checked my version with the one i posted a while back. only changes ive made since then was to output the credit card images.
Comment #21
psynaptic commentedIf you want to get your work committed you need to create a patch.
Make sure your code follows the Drupal coding standards too.
Comment #22
marc.groth commented@merch thanks so much for your response!! Better late than never! ;)
I still haven't had a chance to test it on live, but from what you've said it should definitely work so I'm not too worried... However I will let you know if I run into any problems!
And definitely a big thanks to EVERYONE who has contributed to this module... Not having it would have been a show stopper for me so I am very thankful it exists! :)
Comment #23
psynaptic commentedCode looks good. Just needs a patch.
Comment #24
Pete B commentedTested and code reviewed patch.
Comment #25
psynaptic commented@Pete B & @merch: Patch looks good. Only thing I can question is the use of:
Why didn't you use drupal_goto for this? Any specific reason?
http://drupalcontrib.org/api/function/drupal_goto/6
Comment #26
Pete B commentedI did question that myself when I rolled the patch. I tried replacing it with a drupal_goto, but it did not function correctly.
I believe this is to do with how paypoint handles the callback url, which is requested from the drupal site from within a paypoint url. I think this probably causes a "headers already sent" error on the paypoint site.
The original drupal 5 module contains a commented out drupal_goto in this portion of the code, so I think you possibly experienced similar problems when you wrote the original code?
Thanks,
Pete
Comment #27
merch commented@psynaptic no particular reason apart from the fact that I was unaware of such functionality of drupal, being totaly new to the system as mentioned in post 11. I know now that this is not the drupal way. Any suggestions on how to fix it to be correct?
on a side note my client site is now live with this code and the first sale for over £470 was made successfully. however the order does have a admin comment saying:
"Authentication of hash failed for this transaction."
Comment #28
psynaptic commentedThe "Authentication of hash failed for this transaction." notices are quite common. It just means the md5 security check didn't match. It clearly needs some work to get rid of these false positives.
I really wish I had the time to get down and dirty with a project involving this module but alas I am busy working on other things.
Does anyone here have a CVS account who would be willing to be co-maintainer of this module with me?
Comment #29
marc.groth commentedHi psynaptic,
I would be very interested to help you out however I have a few problems preventing/limiting me:
a) I have no CVS account as of yet :(
b) I work full time (and have other projects I am currently working on)
However this module doesn't seem to be very complicated (like Views for instance ;)) so if that is fine for you... I'd be willing to help you co-maintain this module and iron any of the bugs out...
Do you know if it's possible to apply for a CVS account if only co-maintaining (for the moment)?
Anyway, I am interested. What do you reckon? :)
Comment #30
psynaptic commenteda) I think you should be able to get a CVS account if you link to this issue in your application. I am happy to have you onboard.
b) Co-maintaining this module wouldn't take too much time, my own sites that use this module are still on D5 and I don't have time to test this in the new UC.
So please do go ahead and apply for a CVS account. We'll see what they say :)
Comment #31
marc.groth commentedHi psynaptic,
Thanks very much for that! I have applied for a CVS account. My application can be found here: http://drupal.org/node/641490
Can you (and anyone else who is interested in this module getting a stable 6 release, further improvements etc.) please visit the above link and comment?
Any and all help much appreciated.
Looking forward to (hopefully) becoming a co-maintainer! :)
Comment #32
avpadernoI have approved marc.groth's application, and granted him access to this project CVS.
Comment #33
marc.groth commentedThank you very much KiamLaLuno :)
Comment #34
psynaptic commentedExcellent. Welcome aboard.
Mostly stuff should be discussed in the issue queue before committing but I won't mind if you slip stuff in without declaring it as I know how much it slows down the process. Just make sure we have nice commit history so we can use the cvs-release-notes.php script.
Comment #35
marc.groth commentedGreat thanks psynaptic!
I'm very excited! I've gotten an email explaining everything about CVS so will give that a read and make sure I'm up to scratch with how it all works.
I guess the first job would be to create a 6 branch for the module? At least that way we can branch it out separately rather than having everyone who wants to use it have to patch it...
Does that sound about right?
Comment #36
avpadernoYes, it does.
Basing on what reported in Drupal.org handbooks, branches are always created from HEAD, to avoid revision numbers like 1.2.3.4.5.6.7.8. That means you first update the HEAD code, and then you create the branch from it.
Comment #37
chrispeat commentedHi Everyone,
I was just looking over my posts and remembered that I would report our progress.
We have succesfully joined the original code with the chnages from m.groth to create a fully functioning D6.14 / UC 2.0 paypoint module and have been using it for over a month now.
We haven't had any problems with it yet and are really thankful to everyone for their hardwork. Reporting back on everyone else's success seemed the least we could do.
Thanks
Chris
Comment #38
marc.groth commentedHi all,
Sorry it's taken me a while but there is now a development snapshot for Drupal 6 which can be downloaded on the main page. I'm changing the status of this to "Fixed", but if there is anything specific to this thread that still isn't quite right then please feel free to re-open.
From this point forward, any bugs/fixes for the 6 release should be created in a new issue so we have a differentiation between the different versions.
Thanks again to everyone who made this porting possible.
Comment #39
psynaptic commentedExcellent work. Thanks for helping out and congrats on your first commits :D