Skip to content

Releases: UltraCart/rest_api_v2_sdk_php

New api constructors, major doc updates

02 Feb 15:02
Compare
Choose a tag to compare
3.1.0

New api constructors, major doc updates

Another automation test, no changes

01 Feb 17:59
Compare
Choose a tag to compare
3.0.76

StoreFront Communication plan revision (internal use)

StoreFront Communication plan revision (internal use)

01 Feb 17:42
Compare
Choose a tag to compare
3.0.75

StoreFront Communication plan revision (internal use)

Testing automation. No changes

01 Feb 11:39
Compare
Choose a tag to compare
3.0.74

more bugfix around retry logic

retry logic still broken

29 Jan 17:21
Compare
Choose a tag to compare
3.0.73

more bugfix around retry logic

Breakfix for retry logic. 3.0.71 is broken

29 Jan 14:25
Compare
Choose a tag to compare

We're still trying to get this retry logic working. But we have to deploy out new versions so our merchant base can perform testing. Sorry.

Bugfix on PHP SDK Retry logic NPE

28 Jan 18:27
Compare
Choose a tag to compare
3.0.71

PHP SDK Retry logic NPE bug fix

Maintenance Release - 3.0.68

22 Jan 20:38
Compare
Choose a tag to compare
  • Coupon Batching
  • Screen recording api
  • Email campaign/flow folder support to allow for better management

Maintenance Release - 3.0.62

19 Jan 21:06
Compare
Choose a tag to compare

Automatic Retry (v3.0.62, January 2021)

Starting with 3.0.62, we have modified the standard SDK to include retry logic. This logic was handled to allow
client code to automatically retry if it trips the server side rate limiter

Usage

Set the MaxRetyAfter (seconds) within the Configuration object. This is a failsafe to avoid having client code
hang forever if the retry-after header returns a large number. If you don't mind your code waiting for an hour, then
you may set the retry to 3600, etc.

ultracart\v2\Configuration::getDefaultConfiguration()->setMaxRetrySeconds(30);

This is the actual logic used to determine if a retry should be attempted:

try {
    $response = $this->client->send($request, $options);
} catch (RequestException $e) {

    // BEGIN Retry Logic
    if($e->getResponse()) {
        $retryAfter = 0;
        if (array_key_exists('Retry-After', $headers)) {
            $retryAfter = intval($headers['Retry-After'][0]);
        }

        if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {
            sleep($retryAfter);
            return $this->getCustomersByQueryWithHttpInfoRetry(false, $customer_query, $_limit, $_offset, $_since, $_sort, $_expand);
        }
    }
    // End Retry Logic

    throw new ApiException(
        "[{$e->getCode()}] {$e->getMessage()}",
        $e->getCode(),
        $e->getResponse() ? $e->getResponse()->getHeaders() : null,
        $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
    );
}

Maintenance Release - 3.0.60

18 Jan 19:21
Compare
Choose a tag to compare

Roll up of changes.