CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Problem setting up event reg with google checkout
Pages: [1]

Author Topic: Problem setting up event reg with google checkout  (Read 1890 times)

lanternw

  • Guest
Problem setting up event reg with google checkout
October 30, 2009, 04:13:34 am
Hi,
I am having real issues setting up event registration that have left me scratching my head.
I am using google checkout and have set up test accounts, and am trying out the test drive. My callback API is

http://lanterndesign.co.uk/civicrm/extern/googleNotify.php

Using the event registration test drive, I complete the first event registration page which takes me through to the confirmation page and asks me to click on the google checkout button. When I click on google checkout button, I get the following error:

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    Malformed response
    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> 16
    [message] => Malformed response
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="Malformed response" code=16 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

I really don't know my way around the logs or anything at all, but this backtrace exists in a log I found:

$backTrace = /home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 192
, handle,
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 912
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/PEAR.php, PEAR_Error, 576
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTTP/Request.php, raiseError, 1190
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTTP/Request.php, process, 737
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Payment/Google.php, sendRequest, 162
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Event/Payment/Google.php, doTransferCheckout, 88
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php, doTransferCheckout, 555
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 247
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php, mainProcess, 166
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 63
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 245
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 205
/home/tpgencom/public_html/sites/all/modules/civicrm/civicrm.module, invoke, 341
, civicrm_invoke,
/home/tpgencom/public_html/includes/menu.inc, call_user_func_array, 348
/home/tpgencom/public_html/index.php, menu_execute_active_handler, 18

Unfortunately this is all way over my head... does anyone have any ideas or recommendations for what might be wrong and how to fix it?
Many thanks
Leah

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem setting up event reg with google checkout
October 30, 2009, 04:20:56 am
You have incorrect Resource Url. Make sure you have correctly followed migration instructions: http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location

Kurund
Found this reply helpful? Support CiviCRM

lanternw

  • Guest
Re: Problem setting up event reg with google checkout
October 30, 2009, 07:43:07 am
Hi, I followed those instructions and under Global Settings >>> Resource URL is set to http://www.tpgen.com, but I am still seeing this error...

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem setting up event reg with google checkout
October 30, 2009, 07:52:09 am

that is definitely an invalid resourceURL.

you should check the help section there to see what a valid resource URL looks like: for drupal it might be something like (depending on where u've installed civicrm)

http://www.tpgen.com/sites/all/modules/civicrm/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lanternw

  • Guest
Re: Problem setting up event reg with google checkout
October 30, 2009, 07:59:49 am
Sorry, it is actually set to http://www.tpgen.com/sites/all/modules/civicrm/ . I didn't include the full URL before, by accident. My latest backtrace looks like this:

Oct 30 14:52:20  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> 16
    [message] => Malformed response
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="Malformed response" code=16 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)


Oct 30 14:52:20  [info] $backTrace = /home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 192
, handle,
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 912
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/PEAR.php, PEAR_Error, 576
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTTP/Request.php, raiseError, 1190
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTTP/Request.php, process, 737
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Payment/Google.php, sendRequest, 162
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Event/Payment/Google.php, doTransferCheckout, 88
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php, doTransferCheckout, 555
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 247
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php, mainProcess, 166
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 63
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home/tpgencom/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 245
/home/tpgencom/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 205
/home/tpgencom/public_html/sites/all/modules/civicrm/civicrm.module, invoke, 341
, civicrm_invoke,
/home/tpgencom/public_html/includes/menu.inc, call_user_func_array, 348
/home/tpgencom/public_html/index.php, menu_execute_active_handler, 18



Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem setting up event reg with google checkout
October 30, 2009, 08:02:21 am

your best bet would be to add some debugging code to the response/reqest package and see what google is sending back and why

if you are familiar with PHP, you might want to consider hiring someone from http://civicrm.org/professional/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lanternw

  • Guest
Re: Problem setting up event reg with google checkout
October 30, 2009, 08:06:59 am
I am not sure how to go about debugging the php...  ???

Is it still definitely a problem with my resource URL? Can you tell that from the backtrace? I am pretty much learning PHP as I go along so it's all a foreign language at the moment... I really want to try and get to the bottom of this though.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem setting up event reg with google checkout
October 30, 2009, 09:36:56 am

i dont think it is a problem with your resource URL

u'll need to add some debug statements to:

packages/HTTP/Request.php, line 1189

and see what google returns. might give you/us a clue

unfortunately we cannot teach you php / debugging php on the forums.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lanternw

  • Guest
Re: Problem setting up event reg with google checkout
October 30, 2009, 11:26:55 am
OK so I have added debug lines to the Request.php file. The output shows me that I'm sending the below request to the Google checkout socket: sandbox.google.com:443.

Line 734 is the call to process() which fails (resulting in the Malformed response error message on screen). I debugged line 1188 of Request.php - variable $line is empty after the readLine() call. So I guess I have not got any response at all from Google Checkout???


Further information:
The code successfully completed up to the end of line 733, at which point the response is read. Here the variable $err currently has value 1581, which I assume is the position in the socket data stream which has been written up to. My request below is approximately 1581 characters long, so I believe the request was correctly sent out to the Google checkout socket above.
   // Read the response
            $this->_response = &new HTTP_Response($this->_sock, $this->_listeners);

The request:
POST /checkout/cws/v2/Merchant/470896951563926/checkout HTTP/1.1 Host: sandbox.google.com User-Agent: PEAR HTTP_Request class ( http://pear.php.net/ ) Connection: close Accept-Encoding: gzip Content-Type: application/x-www-form-urlencoded Content-Length: 1312 cart=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPGNoZWNrb3V0LXNob3BwaW5nLWNhcnQgeG1sbnM9Imh0dHA6Ly9jaGVja291dC5nb29nbGUuY29tL3NjaGVtYS8yIj4KICA8c2hvcHBpbmctY2FydD4KICAgIDxpdGVtcz4KICAgICAgPGl0ZW0%2BCiAgICAgICAgPGl0ZW0tbmFtZT5PbmxpbmUgRXZlbnQgUmVnaXN0cmF0aW9uOiBUcmVuZHMgaW4gUHN5Y2hpYXRyaWMgR2VuZXRpY3MgYW5kIE5ldXJvYmlvbG9neSAyMDEwPC9pdGVtLW5hbWU%2BCiAgICAgICAgPGl0ZW0tZGVzY3JpcHRpb24%2BPC9pdGVtLWRlc2NyaXB0aW9uPgogICAgICAgIDx1bml0LXByaWNlIGN1cnJlbmN5PSJVU0QiPjQwMDwvdW5pdC1wcmljZT4KICAgICAgICA8cXVhbnRpdHk%2BMTwvcXVhbnRpdHk%2BCiAgICAgIDwvaXRlbT4KICAgIDwvaXRlbXM%2BCiAgICA8bWVyY2hhbnQtcHJpdmF0ZS1kYXRhPmNvbnRhY3RJRD0xMDIsY29udHJpYnV0aW9uSUQ9MjUsY29udHJpYnV0aW9uVHlwZUlEPTQsZXZlbnRJRD01LHBhcnRpY2lwYW50SUQ9MTIsaW52b2ljZUlEPWI4MmVlODI2YWFjYzQzN2YwYjA3NjhkNDVhMmQ0MDJkPC9tZXJjaGFudC1wcml2YXRlLWRhdGE%2BCiAgPC9zaG9wcGluZy1jYXJ0PgogIDxjaGVja291dC1mbG93LXN1cHBvcnQ%2BCiAgICA8bWVyY2hhbnQtY2hlY2tvdXQtZmxvdy1zdXBwb3J0PgogICAgICA8Y29udGludWUtc2hvcHBpbmctdXJsPmh0dHA6Ly93d3cudHBnZW4uY29tL2Npdmljcm0vZXZlbnQvcmVnaXN0ZXI%2FX3FmX1RoYW5rWW91X2Rpc3BsYXk9MSZhbXA7cWZLZXk9YTVhN2U4M2EyYmI2NTFjMjA5NDQwNmM4MGIyNWM0YzY8L2NvbnRpbnVlLXNob3BwaW5nLXVybD4KICAgIDwvbWVyY2hhbnQtY2hlY2tvdXQtZmxvdy1zdXBwb3J0PgogIDwvY2hlY2tvdXQtZmxvdy1zdXBwb3J0Pgo8L2NoZWNrb3V0LXNob3BwaW5nLWNhcnQ%2BCg%3D%3D&signature=ta69C4TtJ%2BkHJG0ZLEpbPBhHdfA%3D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Problem setting up event reg with google checkout

This forum was archived on 2017-11-26.