Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Quickpay callback status fails:
Failed - The first 24 hours we will make a new callback every hour until success
HTTP Status code: 500
In my sites reports I see this (related) error:
QuickpayException: No amount for transaction @txn_id i QuickpayTransaction->amount() (linje 852 af /var/www/odc-mad.dk/public_html/sites/all/modules/quickpay/quickpay.transaction.inc).
Comments
Comment #2
Xen CreditAttribution: Xen commentedI need more information. Which integration module (commerce/ubercart) is being used?
Comment #3
ejvind chang CreditAttribution: ejvind chang commentedI am using ubercart 7.x-3.8
Comment #4
Xen CreditAttribution: Xen commentedAs far as I can tell, there's nothing that should call amount() in the callback. Any custom code/special handling of orders?
Comment #5
ejvind chang CreditAttribution: ejvind chang commentedYes I do have some custom code that is handling orders - let me try to check if I can find a source for the error in there.
Comment #6
ejvind chang CreditAttribution: ejvind chang commentedAfter tracing a little more i found out that I get this error when trying a callback (http://odc-mad.dk/quickpay/1161/uc_quickpay/xpx_N7SfhQ4gUL4jyaRoosjIAr8N...)
No checksum in callback. Ignoring.
it seems to be missing $_SERVER['HTTP_QUICKPAY_CHECKSUM_SHA256'] in line 98 of transactionCallback() in quickpay.transaction.inc
What could be the reason for this?
Comment #7
Xen CreditAttribution: Xen commentedFanatically configured server perhaps?
Try adding
before the other watchdog, wait for the callback to be triggered and see what $_SERVER contains.
Comment #8
William H. Olesen CreditAttribution: William H. Olesen as a volunteer commentedI'm having the same or at least a similar problem. I hope you'll bear with me, as my tech skills and knowledge are quite limited
My setup is as follows: Drupal 7.50, Ubercart 7.x-3.10, Quickpay Payment gateway 7.x-2.0
Running on VPS on an Apache-serve running php 5.6.24-0.
At the moment the development site is running on a subdomain, but is fully accessible from the outside.
The payment goes through all the way and I'm able to make the capture in Quickpay Manager, but I'm getting this error in the syslog for each callback made by Quickpay, as well as the error message in the Quickpay Manager.
The server reports an error and submits this, according to the sysadmin:
When inserting the snippet from Xen as shown in #7 into my template.php I get a huge error message as shown below.
Comment #9
Xen CreditAttribution: Xen commentedDo you get the "No checksum in callback. Ignoring." message in the watchdog?
Try adding
On a new line before line 853 of quickpay.transaction.inc
Comment #10
William H. Olesen CreditAttribution: William H. Olesen as a volunteer commentedI played around a bit before post #9 - armed with a php- and Drupal-wiser friend - and found that removing line 852 removed the error from the syslog and apparently doesn't cause any problems - at least not any that I can see.
Line 852:
throw new QuickpayException(t('No amount for transaction @txn_id', array('@txn_id', $this->data['id'])));
Anyway, I have now tried inserting Xens snippet. I hope I've done it right - the area around line 852 looks like this now:
The quickpay debug reports this in the syslog:
_SERVER: Array ( [USER] => enigma [HOME] => /var/www/vhosts/enigma.williamolesen.dk [FCGI_ROLE] => RESPONDER [REDIRECT_protossl] => [REDIRECT_HTTP_AUTHORIZATION] => [REDIRECT_STATUS] => 200 [protossl] => [HTTP_AUTHORIZATION] => [proxy-nokeepalive] => 1 [HTTP_HOST] => www.enigma.williamolesen.dk [HTTP_X_REAL_IP] => 193.162.142.212 [HTTP_CONNECTION] => close [CONTENT_LENGTH] => 1193 [HTTP_ACCEPT] => */* [HTTP_QUICKPAY_CHECKSUM_SHA256] => 08dc38d64e5958d60ae3f32aa10fc630ab0c104754952cf8677840b86dddb84a [HTTP_QUICKPAY_RESOURCE_TYPE] => Payment [HTTP_QUICKPAY_ACCOUNT_ID] => 14447 [HTTP_QUICKPAY_API_VERSION] => v10 [HTTP_USER_AGENT] => QuickPay Callback Service (http://tech.quickpay.net/api/callback/) [CONTENT_TYPE] => application/json [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin [SERVER_SIGNATURE] =>
Apache Server at www.enigma.williamolesen.dk Port 80
[SERVER_SOFTWARE] => Apache [SERVER_NAME] => www.enigma.williamolesen.dk [SERVER_ADDR] => 194.150.108.146 [SERVER_PORT] => 80 [REMOTE_ADDR] => 193.162.142.212 [DOCUMENT_ROOT] => /var/www/vhosts/enigma.williamolesen.dk/httpdocs [REQUEST_SCHEME] => http [CONTEXT_PREFIX] => [CONTEXT_DOCUMENT_ROOT] => /var/www/vhosts/enigma.williamolesen.dk/httpdocs [SERVER_ADMIN] => drift@rackhosting.com [SCRIPT_FILENAME] => /var/www/vhosts/enigma.williamolesen.dk/httpdocs/index.php [REMOTE_PORT] => 39470 [REDIRECT_URL] => /quickpay/116/uc_quickpay/VTsGREiPxE2tqYm-jZW43h7NkyBfYeQffUhWk2T63Gw [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.0 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /quickpay/116/uc_quickpay/VTsGREiPxE2tqYm-jZW43h7NkyBfYeQffUhWk2T63Gw [SCRIPT_NAME] => /index.php [PHP_SELF] => /index.php [REQUEST_TIME_FLOAT] => 1469994154.6136 [REQUEST_TIME] => 1469994154 [HTTP_REFERER] => )
There is no reports of "No checksum in callback. Ignoring.", but I have to admit that I'm unsure of what you mean by "watchdog" - I suspecting it's not the same as the syslog (Recent log messages).
As I've mentioned previously I'm not overly strong technical - in fact just a journalist gone a few technologies too far ;)
Comment #11
Xen CreditAttribution: Xen commentedWatchdog is where Drupal logs messages, which it then directs somewhere. The most common case is when dblog is enabled, which gives you the "Recent log messages" page. The syslog module redirects the messages to the Unix syslog daemon, which can log it to files, ignore it or pass it to another server. You obviously have dblog enabled.
Two issues here. For starters I don't get why it tries to get the amount in the callback. Secondly, why it can't load the amount. Try fixing the start of the amount function to look like this:
Comment #12
William H. Olesen CreditAttribution: William H. Olesen as a volunteer commentedSorry for not replying sooner - I didn't get any notification about your post for some reason.
I'll test your suggestion in a few days and report back :)
Comment #13
William H. Olesen CreditAttribution: William H. Olesen as a volunteer commentedI tried inserting the snippet and I got no other info than the ones I got to begin with.
In Recent log messages:
php
DATE Lørdag, August 13, 2016 - 00:19
USER Anonymous (not verified)
LOCATION https://www.fckfc.dk/quickpay/241/uc_quickpay/BCvjfc37s8PAGCVw1I7qVlGWO9...
REFERRER
BESKED QuickpayException: No amount for transaction @txn_id in QuickpayTransaction->amount() (line 853 of /var/www/vhosts/fckfc.dk/httpdocs/sites/all/modules/quickpay/quickpay.transaction.inc).
SEVERITY error
HOSTNAME 193.162.142.210
And in Quickpay Manager:
Failed - The first 24 hours we will make a new callback every hour until success
HTTP Status kode: 500
URL: https://www.fckfc.dk/quickpay/241/uc_quickpay/BCvjfc37s8PAGCVw1I7qVlGWO9...
After that, I can see from Recent log messages that it makes that call every hour the following 24 hours - as promised.
This is when the original line 852 is included
throw new QuickpayException(t('No amount for transaction @txn_id', array('@txn_id', $this->data['id'])));
As mentioned I out commented this and it works and I got no errors anywhere that I can see.
Would you like me to try inserting your snippet while the mentioned line is out commented?
Comment #14
William H. Olesen CreditAttribution: William H. Olesen as a volunteer commentedWhops - I got this one 20 minutes later after having changed back to having outcommented line 852.
TYPE quickpay
DATE Lørdag, August 13, 2016 - 00:40
USER Anonymous (not verified)
LOCATION https://www.fckfc.dk/quickpay/241/uc_quickpay/BCvjfc37s8PAGCVw1I7qVlGWO9..
REFERRER http://www.google.dk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDMQF...
BESKED Arguments failed hash check. Either someone is trying to abuse the site, or there is a bug somewhere. Path: quickpay/241/uc_quickpay/BCvjfc37s8PAGCVw1I7qVlGWO9..
SEVERITY warning
HOSTNAME 66.102.6.183
Comment #15
Xen CreditAttribution: Xen commentedRemoving the line is going to do no good as it simply the line that notifies the rest of the system that something isn't as it's supposed to be. Removing it just causes it to ignore it, which can cause all sorts of trouble later.
Try placing this before the problematic throw statement:
You'll want to mail me the logged statements to xen [at] xen.dk, as they're likely to contain moderately sensitive data.
Comment #17
Xen CreditAttribution: Xen commented