500 error

Kevin Huff's Avatar

Kevin Huff

01 Jun, 2018 08:52 AM

I'm getting a 500 error when creating a new user in my dev environment. User gets created though and I get a 412 error if I try to run the page a second time. Nothing shows up in my error log. I'm using the php wrapper, pulled from composer. Code is as follows with the PI obfuscated:

 $client = new CheddarGetter_Client(
                'https://cheddargetter.com',
                '***********************',
                '*****************',
                '****************'
            );
            $data = array(
                'code'          => $call_info["first_name"]."_".$call_info["last_name"]."_".$call_info["call_id"],
                'firstName'     => $call_info["first_name"],
                'lastName'      => $call_info["last_name"],
                'email'         => $call_info["email"],
                'subscription'  => array(
                    'planCode'      => $plan_code,
                    'ccNumber'      => str_replace(' ', '', $this->CI->input->post('cardNumber')),
                    'ccExpiration'  => str_replace(' ', '', $this->CI->input->post('cardExpiry')),
                    'ccCardCode'  => $this->CI->input->post('cardCVC'),
                    'ccFirstName'   => $call_info["first_name"],
                    'ccLastName'    => $call_info["last_name"],
                    'ccZip'         => $call_info["zip"]
                )
            );
        try{
            $response = $client->newCustomer($data);
        }catch(CheddarGetter_Response_Exception $re){
            if ($re->getCode() == 412) { // missing fields or field format errors
                echo "\n\tERROR - MISSING OR INVALID FIELDS:\n";
                echo "\n\t(" . $re->getCode() . ':' . $re->getAuxCode() . ') ';
                echo $re->getMessage()."\n";
            } else if ($re->getCode() == 422) { // payment processing errors
                echo "\n\tAN ERROR OCCURED DURING PAYMENT PROCESSING:\n";
                echo "\n\t(" . $re->getCode() . ':' . $re->getAuxCode() . ') ';
                echo $re->getMessage()."\n";
            } else {
                echo "\n\t"."ERROR: (" . $re->getCode() . ':' . $re->getAuxCode() . ') ';
                echo $re->getMessage()."\n";
             }
        } catch (Exception $e) {
            echo "\n\t" . 'ERROR: (' . $e->getCode() . ') ' . $e->getMessage() . "\n";
        }

The values of the data array are as follows. (Once more with PI obfuscated):

array(5) {
  ["code"]=>
  string(13) "Kevin_Huff_64"
  ["firstName"]=>
  string(5) "Kevin"
  ["lastName"]=>
  string(4) "Huff"
  ["email"]=>
  string(23) "******************"
  ["subscription"]=>
  array(7) {
    ["planCode"]=>
    string(19) "***********************"
    ["ccNumber"]=>
    string(16) "4111111111111111"
    ["ccExpiration"]=>
    string(7) "04/2028"
    ["ccCardCode"]=>
    string(3) "123"
    ["ccFirstName"]=>
    string(5) "Kevin"
    ["ccLastName"]=>
    string(4) "Huff"
    ["ccZip"]=>
    string(5) "65802"
  }
}
  1. 1 Posted by Kevin Huff on 01 Jun, 2018 10:02 AM

    Kevin Huff's Avatar

    Just an update since I've been playing around with the API some more. I added some charges to the newCustomer call and the results were the same. However it seems as though if I add tracked items to it, I still get the 500 error but the user is not created. Still nothing showing in the error log on the site.

  2. 2 Posted by Ka Wai Cheung on 01 Jun, 2018 01:35 PM

    Ka Wai Cheung's Avatar

    Same issue - getting 500 errors upon creating new customer, though they are created in CG.

  3. 3 Posted by Michiel Vermeul... on 01 Jun, 2018 01:36 PM

    Michiel Vermeulen's Avatar

    Same here

  4. 4 Posted by Marcela Poffald on 01 Jun, 2018 01:50 PM

    Marcela Poffald's Avatar

    Hello,

    Sorry to hear you're having trouble with the create customers call! We've determined that these 500 errors are being caused by a database issue, and we're working with our DBA to get a fix in place as soon as possible. We'll keep you updated, but please feel free to subscribe to updates on our status page as well.

    Marcela

  5. Support Staff 5 Posted by Meghan Turner on 01 Jun, 2018 02:50 PM

    Meghan Turner's Avatar

    Hey All,

    We were able to release a fix for this issue about 30 minutes ago and all appears to be functioning normally now. Go ahead and try out the customer create call again and let me know if you experience any unexpected behavior.

    Meghan

  6. 6 Posted by Ka Wai Cheung on 01 Jun, 2018 03:38 PM

    Ka Wai Cheung's Avatar

    This is working for me now.

  7. 7 Posted by Kevin Huff on 01 Jun, 2018 07:47 PM

    Kevin Huff's Avatar

    Works for me. Thanks for the quick fix.

  8. Marcela Poffald closed this discussion on 01 Jun, 2018 08:12 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM