Closed (fixed)
Project:
Commerce Paybox (Verifone e-commerce)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2014 at 11:31 UTC
Updated:
4 Nov 2016 at 10:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dgeo commentedComment #2
simon georges commentedJust a note: there already is no need for the CGI module if you use the PPPS method for Paybox. Anyway, I'll let you work on the patch. Thanks!
Comment #3
dgeo commentedYes, but PPPS method would force us to get payment informations, and we prefer not to be responsible for them :)
Comment #4
dgeo commentedHere it is: seems to work for us®
Please take a look as we aren't really drupal-skilled…
Comment #5
dgeo commentedWell-named patch…
Comment #6
dgeo commentedComment #8
dgeo commentedwell-formed git patch…
Comment #9
dgeo commentedComment #10
dgeo commentedNew patch is against 1.x-dev version (though unmodified since 1.1)
Comment #11
dgeo commentedadjusted admin interface. Should be understandable for everyone, HMAC is marked as 'preferred' method for Paybox System offsite.
Comment #12
dgeo commentedComment #13
grimreaperHello,
Thanks for the patch.
I test without it, and the offsite payment method fail, in the error message it says that it require the CGI bin.
I don't know if I can test with it because I don't have paybox account. Is there an API provided by paybox to have a test gateway ?
I review your patch, I don't have a lot of things to say : mainly coding style standards, and the next point.
I don't understand this part as there is already a variable_get to go in this part of the if ... else .. statement
Thanks for the patch.
EDIT : maybe in the .install file, you should add variable_del for the new variables you introduce.
Comment #14
dgeo commentedunfortunately, testing api on their side seems to be accessible only for clients. Maybe they can understand the problem and open a test-only account for this module ?
I'll have a look quickly to your suggestions. Thank you for feedback !
Comment #15
dgeo commentedComment #16
dgeo commentederror in variable commerce_paybox_alg corrected in .install
Comment #17
grimreaperHello,
I attach a patch where I have fixed all the coding styles issues to not losing time in long patch exchanges.
The problems were mostly:
I have nothing else to say.
I can't help you any more because I can't test if it is functionnal with the paybox API.
Thanks for your patch. Hoping it will be merged as soon as possible :)
Comment #18
dgeo commentedthank you Grimreaper :)
I'll try to better respect those rules next time…
Comment #20
seren10pity13 commentedHi !
thank you very much dgeo, that's just what I needed and it saved me a lot of work !
I just had to change one thing in your patch : The
$hmacmusn't be in lowercase as it is set in uppercase in the form. This causes the Paybox system to return an error cause it makes the the hash and the form data different.Except that point, your patch worked like a charm !
Comment #21
Mantalo Conseil commentedHello,
Is this patch will be add to a new release soon ??
Thanks.
Comment #22
simon georges commentedIf I understand correctly, this patch removes the need for a CGI module, am I right?
Since several people are confirming it works, I'm willing to commit it. But I'm unable to release a new version (I have not the right), so it will live in the -dev version for now...).
Comment #23
seren10pity13 commentedYes, that's it. This removes the need of CGI module.
Thanks for the dev !
Comment #24
dgeo commented@seren10pity13: I don't agree with #20: the $hash variable will just be used in hash_hmac function call. The form element will still be $pbx_params['PBX_HASH'] (uppercased).
Furthermore this code works here with paybox tests servers AND production ones… Could you double-check this change is needed for you ?
If you need it, could you please provide more details about your install (php version, OS, output of
<?php print_r(hash_algos());to see if they are uppercased here)Working here under FreeBSD 9 & 10, debian wheezy, php 5.4, php 5.3. algorithmes list:
Thank you, hope this can be included after double-checking this !
Comment #25
dgeo commentedComment #26
dgeo commentedComment #27
jcisio commentedWorks as expected. I check the algo and if is ok. All listed HMAC algos are supported in the first version of PHP where hash_hmac() was introduced.
In the attached patch there are a few more modification: correct some words and rename variables to match their meaning, so I'll keep the issue as RTBC.
Comment #28
jcisio commentedOoops the patch was diff'ed against master instead of 7.x-1.x.
Comment #29
jcisio commentedComment #32
dgeo commentedPlease commit (may I help ?)
Comment #34
simon georges commentedAlright, committed. Let me know if the -dev version (in a few hours) is correctly working, I'll eventually tag a new one.
Thanks for all the work and collaboration on the issue, and my apologies for the delay!
Comment #36
pvasener commentedThe latest -dev version doesn't work for me. I don't want to use the PBX_HMAC method so, I let the key empty but I have an 'unknown shop' error when I'm redirected to the Paybox page. I found a missing line in the code. Here is a patch which solved my problem.
Comment #37
dgeo commented@pvasener: sorry, you're right I broke CGI :(
Here is a patch against current -dev that should (please test it !) correct this: the line you added already exist in the code, it just needed another
Give it a try and report…
Comment #38
dgeo commentedto test the last patch
Comment #39
grubshka_v2 commentedHMAC method works well for me, thanks for your patch !
Comment #41
arnaud.dabouis commentedThe patch has been applied to the dev branch, switching it to fixed.
Comment #43
dgeo commentedCould this be an occasion to release a new stable version ?