Giter Club home page Giter Club logo

chargify-sdk-php's People

Contributors

joshwbrick avatar lhkhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chargify-sdk-php's Issues

\GuzzleHttp\Message\Response getStatus

Hi;

I think there may be an issue calling the getStatus on \GuzzleHttp\Message\Response objects, should this be getStatusCode, or am I missing something?

example...
\crucial\Service\Chargify\Customer - line 276

\crucial\Service\Chargify\Customer - line 299

Thanks

Guzzle Version

Using a very old version of guzzle that conflicts with all sorts of other dependencies.

Network error

No matter what I do or try, I keep getting the same error. I have developed everything on a staging server and it works fine. When i move it to our production servers we get the error below. No matter what call I make (subscriptions, transactions, ...) nothing works on server A while on server B the exact same script works fine. I have checked everything again and again but I must overlook something obvious.

The error we are getting in the response is :

{ ["Crucial_Service_Chargify"]=> array(1) { ["networking error"]=> string(11) "no response" } }

Call object doesn't read errors in certain scenarios

I am trying to read a response from a request from Direct but don't see any errors, even when i force an error. It looks like the Call class is looking in the wrong place for the errors. When I try to re-submit a form with previously used secure data, the output of $return in the getResponseArray() in the Call method shows the following

array:1 [▼
  "call" => array:7 [▼
    "id" => "my_id"
    "api_id" => "my_api_id"
    "timestamp" => 1448233460
    "nonce" => "some_nonce"
    "request" => array:3 [▼
      "secure" => array:5 [▼
        "api_id" => "my_api_id"
        "timestamp" => "1448233460"
        "nonce" => "some_nonce"
        "data" => "redirect_uri=myredirecturi"
        "signature" => "some_signature"
      ]
      "signup" => array:2 [▼
        "product" => array:1 [▼
          "handle" => "selected-plan"
        ]
        "payment_profile" => array:11 [▼
          "card_number" => ""
          "expiration_month" => "x"
          "expiration_year" => "xxxx"
          "first_name" => "Example"
          "last_name" => "User"
          "email" => "[email protected]"
          "billing_address" => ""
          "billing_address_2" => ""
          "billing_city" => ""
          "billing_country" => ""
          "billing_zip" => ""
        ]
      ]
    ]
    "response" => array:2 [▼
      "result" => array:3 [▼
        "status_code" => 422
        "result_code" => 4221
        "errors" => array:1 [▼
          0 => array:2 [▼
            "attribute" => "base"
            "message" => "Duplicate submission detected. Please try again, and refrain from using your browser's Back button"
          ]
        ]
      ]
      "meta" => array:3 [▼
        "status_code" => 422
        "result_code" => 4221
        "errors" => array:1 [▼
          0 => array:2 [▼
            "attribute" => "base"
            "message" => "Duplicate submission detected. Please try again, and refrain from using your browser's Back button"
          ]
        ]
      ]
    ]
    "success" => false
  ]
]

So, instead of looking in $return['result']['errors'], it should be looking in $return['call']['response']['result']['errors']. I noticed that the Call class has a note about this but there hasn't been any fix implemented to catch these errors.

Invoice payment

Hi guys,
How do I use the api to make payments on the invoice method?

regards,

cancelImmediately results in error 500

When I'm trying to cancel a subscription immediately, it results in an error 500 from chargify.

Reproduce:

$chargify = new Chargify($arrConfig);
$subscription = $chargify->subscription();
$subscription->cancelImmediately(1234);

Possible cause:

An empty array is sent along as rawData.

Proposed Fix:

Service\Chargify\Subscription.php Line 437:

    $rawData = null;
    if($this->_params != []) {
        $rawData = $this->getRawData(array('subscription' => $this->_params));
    }

Announcement: new maintainer wanted

Hello all,

I've realized that I do not have time to maintain this project any longer and am looking for a new maintainer. Please ping @dan-bowen in this thread if you are interested in becoming a maintainer.

-Dan

Load _data

Hi guys,

How I can read the contents of _data object?
I'm using the customer method to check if a Customer already exists!!

br,

Suggestion to clarify docs on Subscription migrate()

Took me probably an hour of confusion before realizing the $id you pass into migrate($id) is the ID of the existing subscription, not the ID of the plan you wish to migrate to. I was trying to figure out how to create an instance of a Subscription object that referred to an existing subscription, then calling ->migrate($newProductID) on that. As far as I can tell, you cannot create an instance of an existing Subscription. Only option I found was to use listByCustomer() but that returns an array when you use offsetGet().

For posterity and anyone else who finds this and is confused, it will look something like this:

$chargify->subscription()->setProductId($newProductID)->migrate($existingSubscriptionID);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.