crucialwebstudio / chargify-sdk-php Goto Github PK
View Code? Open in Web Editor NEWChargify SDK for PHP
License: Apache License 2.0
Chargify SDK for PHP
License: Apache License 2.0
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
Using a very old version of guzzle that conflicts with all sorts of other dependencies.
Hey guys, I've implemented a new method on the Subscription
class to retrieve subscriptions preview.
Please, let me know if it needs any adjustments.
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" } }
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.
Hi guys,
How do I use the api to make payments on the invoice method?
regards,
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));
}
https://github.com/chargely/chargify-sdk-php/blob/master/src/Crucial/Service/Chargify.php#L46
Noticed this while inspecting response from a V2 call that is failing - still looking into why it's failing.
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
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,
https://github.com/chargely/chargify-sdk-php/blob/master/src/Crucial/Service/ChargifyV2.php#L198
This causes a "error" => "Could not resolve host: calls"
because it is attempting to make a request to "url" => "HTTP://calls/01200a96bbe01fbc5177abd3396e2caae9d4d0f2"
. I assume there is something about the version of Guzzle you updated to that does not read the base_url
as expected when you create a new httpClient
Just noticed that the Guzzle version for your SDK is hard coded, which means I can't use it with the AWS SDK...
Any specific reasons for this?
Thanks,
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);
I want to handle webhooks using this library.
Can you show me any code sample?
Thanks !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.