Tags: victorcaina/pagarme-php
Tags
client: fixes legacy guzzle request objects instantiation Theres a big difference between `5.*` and `6.*` guzzle majors. So, in the `PagarMe\Sdk\Client::buildRequest` method the sdk should instantiate the correct request object accordingly its contracts, in this case twice: `\GuzzleHttp\Message\Request` and `\GuzzleHttp\Psr7\Request`. If the user define request options, in guzzle `5.*` this options should be within the request object. If the major is `6.*` the options should be informed on `\GuzzleHttp\Client::send()` method as a second argument. This fixes the described behavior above informing the request options on the right places.
client: pass the timeout parameter to Client When the SDK is instantiated the timeout parameter is not passed to the Client and the method send utilize this parameter, without it, the timeout will always be null, because the GuzzleClient timeout is always overwrited.
Fix wrong object type after create a transaction (#252) * customer: fix customer type on API response When the SDK create the transaction object from the API response the customer object is showing like a stdClass. This commit fix this by switching this stdClass to the Customer object. * card: fix card type on API response When the SDK create the transaction object from the API response the card object is showing like a stdClass. This commit fix this by switching this stdClass to the Card object. * tests: fix tests to not access id property directly * tests: fix tests failing The bulk anticipation tests fails in some days of the week because it count +5 days and +6 days from current date time, and the anticipation must be in a business day. This PR fix this by validating the week day and changing the count if the day is a weekend.
PreviousNext