3

I have a contribution campaign to accept donations on a site. Regardless of whether the payment processor is Stripe or Test, when submitting the page on the site with the correct payment deatils in the page just gets rendered again with a blank form, never progressing to the summary page with the "make contribution" button. On the other hand, in the admin dashboard when clicking on Links->test drive and then going through the process everything works smoothly and the payment is processed. What can the problem be?

UPDATE:

After further investigation using Tamperdata, the request is

Working

Request from Civicrm admin dashboard

Host=101.122.67.45
User-Agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language=en-US,en;q=0.5
Accept-Encoding=gzip, deflate
Referer=http://101.122.67.45/wp-admin/admin.php?page=CiviCRM&q=civicrm/contribute/transact&_qf_Main_display=true&qfKey=85423cf986fdeb631dd7c5e4c0bad81e_5551
Cookie=wordpress_083d326810ec17903325f7b61c4f9088=COOKIE_LOGGED_IN_USER; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_083d326810ec17903325f7b61c4f9088=andrea%7C1437352434%7CHWOTKzfHmQimVC2IUYuT6ebqBLNe3RCP9bkIB8AzoJ9%7Cf9726d5bd3b53f33c9db4f10c108d2bf6978ef9a1022dda7637db30211ca9c8b; wp-settings-1=editor%3Dhtml; wp-settings-time-1=1437179635; PHPSESSID=gn5e13pkq6lfdd5bq7tjpv2e14; __utma=239134727.820967299.1437178983.1437178983.1437178983.1; __utmb=239134727.4.10.1437178983; __utmc=239134727; __utmz=239134727.1437178983.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); displayCookieConsent=y; __utmt=1
Connection=keep-alive
Content-Type=multipart/form-data; boundary=---------------------------1914650991686166477678502416
Content-Length=3146
POSTDATA =------

Response

Status=Found - 302
Date=Sat, 18 Jul 2015 00:37:37 GMT
Server=Apache/2.4.7 (Ubuntu)
X-Powered-By=PHP/5.5.9-1ubuntu4.9
Expires=Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control=no-cache, must-revalidate, max-age=0
Pragma=no-cache
X-Frame-Options=SAMEORIGIN
Set-Cookie=X-Frame-Events_52c2f7692fdc8e76425fe47b80fe421d=%7B%22event%22%3A%22CiviCRM%22%2C%22context%22%3A%22attach_to_post%22%7D
Location=http://101.122.67.45/wp-admin/admin.php?page=CiviCRM&q=civicrm/contribute/transact&_qf_Confirm_display=true&qfKey=85423cf986fdeb631dd7c5e4c0bad81e_5551
Content-Length=0
Keep-Alive=timeout=5, max=100
Connection=Keep-Alive
Content-Type=text/html

Non Working

Request from website form

Host=101.122.67.45
User-Agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language=en-US,en;q=0.5
Accept-Encoding=gzip, deflate
Referer=http://101.122.67.45/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1&action=preview
Cookie=wordpress_test_cookie=WP+Cookie+check; PHPSESSID=gn5e13pkq6lfdd5bq7tjpv2e14; __utma=239134727.820967299.1437178983.1437178983.1437178983.1; __utmb=239134727.2.10.1437178983; __utmc=239134727; __utmz=239134727.1437178983.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt=1; displayCookieConsent=y
Connection=keep-alive
Content-Type=multipart/form-data; boundary=---------------------------12659349391619910645601300712
Content-Length=3137
POSTDATA =-----------------

Response

Status=Found - 302
Date=Sat, 18 Jul 2015 00:28:46 GMT
Server=Apache/2.4.7 (Ubuntu)
X-Powered-By=PHP/5.5.9-1ubuntu4.9
Expires=Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control=no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma=no-cache
X-Pingback=http://101.122.67.45/xmlrpc.php
Location=http://101.122.67.45/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&page=CiviCRM&reset=1&id=1&action=preview
Content-Length=0
Keep-Alive=timeout=5, max=100
Connection=Keep-Alive
Content-Type=text/html; charset=UTF-8

For some reason the request from the admin dashboard panel is slightly different than from the web form on the site the public web form fails to set the qfKey= parameter resulting in

// Get proper entry URL for returning on error.
if (!(array_key_exists('qfKey', $params))) {
  // Probably not called from a civicrm form (e.g. webform) -
  // will return error object to original api caller.
  $params['stripe_error_url'] = $error_url = null;
}

Missing the query parameter generates an incorrect response. Why is this parameter not being sent while it exits in the hidden input form on the public site?

5
  • You need to find out what is the error. If your site is not in production, you should activate debug mode and display the trace - civicrm/admin/setting/debug?reset=1
    – samuelsov
    Commented Jul 17, 2015 at 20:29
  • Hi @samuelsov I enabled it, no stacktrace, the problem is the form submitting the wrong request. Could it need a FQDN?
    – andrea-f
    Commented Jul 18, 2015 at 11:35
  • I see you're using WordPress. Have you tried turning off all plugins and switching to a basic theme (like Twenty Fifteen) to see if we can eliminate contributed code as a cause?
    – Nicholai
    Commented Jul 23, 2015 at 2:16
  • Not sure this will help, but might be worth a try? I've seen server security settings which cause parameters to be dropped from the url. So the url gets chopped on the final page. If you think this could be the cause, I'd speak to your hosts and see if they can help identify why the parameter is being blocked / dropped.
    – Heather O.
    Commented Jul 23, 2015 at 8:13
  • @andrea-f, have you had any luck with this. I am having the same issue.
    – Yossi
    Commented Sep 10, 2015 at 23:57

1 Answer 1

1

To solve this problem I uninstalled all the plugins and left only Civicrm, that made the form to submit correctly. Then I re enabled each plugin one at a time, just the ones I needed and not only disabled but also removed all the other ones. The form now submits correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.