Closed Upperholme closed 7 years ago
CiviCRM has recorded a contribution with the status of "Failed".
Have a look in CiviCRM's ConfigAndLog/CiviCRM.GoCardless.xxxxxxx.log
file. In typical Drupal installs this is at sites/default/files/civicrm/ConfigAndLog/
and in Wordpress it's in the uploads/civicrm/ConfigAndLog
dir.
All I see in the GoCardless log is this entry, which I think actually relates to me accessing the webhook URL from my browser:
`Jan 18 17:59:32 [info] Webhook 2017-01-18:17:59:32 body:
Jan 18 17:59:32 [info] Webhook 2017-01-18:17:59:32 headers: {"Host":"dev.xyz.co.uk","Cookie":"wordpress_logged_in_f9a2b133f96b3ea098e4403d9f68b546=Graham%7C1484927385%7CuJPd9Lvb7Wa9xRDsLBsg0T3abtw5ZGKm4nRkDyqlfeJ%7C58f18080dc1c52000558e96671d621495ee29ca14f772556efbcf96f2e8a4da9; wordpress_test_cookie=WP+Cookie+check; PHPSESSID=etvtv4h6cm8fnhphfb2h7nur36; wp-settings-4=wplink%3D1; wp-settings-time-4=1481291834; utma=68204034.1322429798.1465321437.1465321437.1484732981.2; utmc=68204034; __utmz=68204034.1484732981.2.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga=GA1.3.1322429798.1465321437; KCFINDER_displaySettings=off; KCFINDER_order=name; KCFINDER_orderDesc=off; KCFINDER_showname=on; KCFINDER_showsize=off; KCFINDER_showtime=off; KCFINDER_view=thumbs","Connection":"keep-alive","Upgrade-Insecure-Requests":"1","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,\/;q=0.8","User-Agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit\/602.3.12 (KHTML, like Gecko) Version\/10.0.2 Safari\/602.3.12","Accept-Language":"en-gb","DNT":"1","Accept-Encoding":"gzip, deflate"} `
Using the exact same sandbox credentials in the 'live' settings for the payment processor in Civi, and I get a different result: I don't even get as far as getting taken to GC's form when I click 'Contribute'.
Instead I get the error message displayed "Error Sorry, there was an error contacting the payment processor GoCardless."
Nothing in the GoCardless log or the PHP error log.
Ah! Found it, I think. Commit following.
(The live one with your setup (test credentials in live credentials box) will never work - it talks to the wrong GoCardless end point, so that's perfectly expected behaviour.)
@Upperholme github closed that for me - I don't consider it closed until you tell me it works; I've not tested this latest patch - please could you? Nb. as well as (hopefully) fixing things, it adds a load of logging.
Thanks. I've installed the latest code, and, out of curiosity, instead of trying to buy a membership I tried with a simple recurring contribution. That works - as far as I can see. I have a customer record crated in my sandbox account, and I have a pending payment. I've received emails from GoCardless - one as the customer making the payment, and one as the account owner telling me I've got a customer.
What I did note, when setting up the recurring contribution page, is that I can set it to allow a weekly recurrence. However if I set up membership type, to test a membership, Civi does not give me the option to set '1 week' as the membership period. If only offers 'day', 'month', 'year' and 'lifetime' as options. When I set up my test membership type I set it to '7 days' - wondering if that is breaking the attempted payment?
Will do some more tests.
Many thanks for the help on this.
Glad the basic recurring payment is working.
I'm unfamiliar with CiviCRM's membership thing however, GoCardless does not support daily as an interval and so the extension will throw an exception if you try that.
Try a month? Or try asking elsewhere about why the membership thing doesn't have 'week' as an option.
Yep. Just set up a membership with a 1 month duration, and was able to purchase that successfully.
woop
"try asking elsewhere about why the membership thing doesn't have 'week' as an option": http://civicrm.stackexchange.com/questions/16770/can-we-have-a-week-option-for-the-membership-type-duration-unit
Use a test-drive contribution page set up for a £1 membership that runs for 7 days. Got taken to the GC sandbox where I filled in the form using my details and the dummy bank account data. That all appeared to be successfully accepted, and got taken back to my development site to the 'thank-you' page, where the error message was displayed: "Error: Sorry, we were unable to set up your Direct Debit. Please call us."
Nothing logged in my PHP error log, and nothing recorded in my GC sandbox account. Any insight/pointers most welcome.