Change Subscription Example.

Alejandro Sanchez's Avatar

Alejandro Sanchez

29 Apr, 2010 10:22 PM

You guys should post some examples of subscription change, it is a very common use case! And I have had problems trying to implement it.

More documentation please!!

  1. Support Staff 1 Posted by Marc Guyer on 29 Apr, 2010 10:57 PM

    Marc Guyer's Avatar

    This KB article has been available base on the PHP wrapper:

    http://support.cheddargetter.com/faqs/api-8/sample-integration-roadmap

    We just added a couple of examples of subscription changes. Its essentially the same as creating a new customer only easier.

    If you're looking for something else, please let us know!

  2. 2 Posted by Alejandro Sanch... on 29 Apr, 2010 11:51 PM

    Alejandro Sanchez's Avatar

    My problem was the parameters in the "data" array, I was passing :

        $data = array(
            'subscription'  => array(
                'planCode'      => $newPlanCode
            )
        );
    

    Instead of:

        $data = array(
                'planCode'      => $newPlanCode
        );
    

    And the CheddarGetter open source wraper does not returned a exception or problem, also the xml response was clean.

    Thanks for you very quick response!

  3. Support Staff 3 Posted by Marc Guyer on 30 Apr, 2010 03:03 PM

    Marc Guyer's Avatar

    That works too but you'd need to use the CheddarGetter_Client::editCustomer() method. That method takes the same array format as CheddarGetter_Client::newCustomer(). *CheddarGetter_Client::editSubscription() is more of a convenience method. Unfortunately in this case, it seems to have only caused confusion.

    What do you mean by "also the xml response was clean"? I can see the errors in your log. Those errors are returned by the API. When the wrapper discovers and error node in the API response, an exception is thrown.

  4. Dean closed this discussion on 16 Jan, 2013 02:56 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