Skip to content

Commit

Permalink
NEW Upgrade of Stripe lib to 6.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 7, 2018
1 parent fe45e82 commit b9f1695
Show file tree
Hide file tree
Showing 59 changed files with 886 additions and 4,326 deletions.
1 change: 0 additions & 1 deletion htdocs/includes/stripe/.travis.yml
Expand Up @@ -3,7 +3,6 @@ sudo: false
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
Expand Down
Empty file modified htdocs/includes/stripe/build.php 100755 → 100644
Empty file.
1,115 changes: 421 additions & 694 deletions htdocs/includes/stripe/data/ca-certificates.crt

Large diffs are not rendered by default.

Binary file removed htdocs/includes/stripe/data/test.png
Binary file not shown.
43 changes: 0 additions & 43 deletions htdocs/includes/stripe/lib/AttachedObject.php

This file was deleted.

9 changes: 9 additions & 0 deletions htdocs/includes/stripe/lib/Error/Base.php
Expand Up @@ -20,11 +20,20 @@ public function __construct(
$this->httpHeaders = $httpHeaders;
$this->requestId = null;

// TODO: make this a proper constructor argument in the next major
// release.
$this->stripeCode = isset($jsonBody["error"]["code"]) ? $jsonBody["error"]["code"] : null;

if ($httpHeaders && isset($httpHeaders['Request-Id'])) {
$this->requestId = $httpHeaders['Request-Id'];
}
}

public function getStripeCode()
{
return $this->stripeCode;
}

public function getHttpStatus()
{
return $this->httpStatus;
Expand Down
13 changes: 6 additions & 7 deletions htdocs/includes/stripe/lib/Error/Card.php
Expand Up @@ -15,12 +15,16 @@ public function __construct(
) {
parent::__construct($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders);
$this->stripeParam = $stripeParam;

// TODO: once Error\Base accepts the error code as an argument, pass it
// in the call to parent::__construct() and stop setting it here.
$this->stripeCode = $stripeCode;

// This one is not like the others because it was added later and we're
// trying to do our best not to change the public interface of this class'
// constructor. We should consider changing its implementation on the
// next major version bump of this library.
// constructor.
// TODO: make this a proper constructor argument in the next major
// release.
$this->declineCode = isset($jsonBody["error"]["decline_code"]) ? $jsonBody["error"]["decline_code"] : null;
}

Expand All @@ -29,11 +33,6 @@ public function getDeclineCode()
return $this->declineCode;
}

public function getStripeCode()
{
return $this->stripeCode;
}

public function getStripeParam()
{
return $this->stripeParam;
Expand Down
92 changes: 0 additions & 92 deletions htdocs/includes/stripe/lib/ExternalAccount.php

This file was deleted.

4 changes: 2 additions & 2 deletions htdocs/includes/stripe/lib/HttpClient/ClientInterface.php
Expand Up @@ -11,8 +11,8 @@ interface ClientInterface
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
* @param boolean $hasFile Whether or not $params references a file (via an @ prefix or
* CurlFile)
* @throws Error\Api & Error\ApiConnection
* @return array($rawBody, $httpStatusCode, $httpHeader)
* @throws \Stripe\Error\Api & \Stripe\Error\ApiConnection
* @return [$rawBody, $httpStatusCode, $httpHeader]
*/
public function request($method, $absUrl, $headers, $params, $hasFile);
}

0 comments on commit b9f1695

Please sign in to comment.