Skip to content

Commit

Permalink
Merge pull request #1387 from stripe/anniel/merge-master-into-next-major
Browse files Browse the repository at this point in the history
Bring next major branch up to date with master
  • Loading branch information
anniel-stripe authored Oct 31, 2022
2 parents ff3601c + 5d2d329 commit 98a01bc
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 28 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:3.4.0
with:
args: --format=txt --diff --dry-run --using-cache=no --verbose .
args: --format=txt --diff --dry-run --using-cache=no --verbose

phpstan:
name: PHPStan
Expand Down Expand Up @@ -67,13 +67,13 @@ jobs:
# We run php-cs-fixer in a separate job, but the version we use is not compatible
# with all the versions of PHP that we want to execute PHPStan upon
- name: Trim dependency
run: composer remove --dev friendsofphp/php-cs-fixer
run: composer remove --dev --no-update friendsofphp/php-cs-fixer

- name: Validate composer.json and composer.lock
- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run phpstan
run: make phpstan
Expand Down Expand Up @@ -120,13 +120,13 @@ jobs:
# We run php-cs-fixer and PHPStan in separate jobs, but the versions we use are not compatible
# with all the versions of PHP that we want to execute PHPUnit upon
- name: Trim dependency
run: composer remove --dev friendsofphp/php-cs-fixer phpstan/phpstan
run: composer remove --dev --no-update friendsofphp/php-cs-fixer phpstan/phpstan

- name: Validate composer.json and composer.lock
- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Start stripe-mock
run: docker pull stripe/stripe-mock && docker run -d -p 12111-12112:12111-12112 stripe/stripe-mock && sleep 5
Expand All @@ -138,7 +138,7 @@ jobs:
- name: Coveralls
run: vendor/bin/php-coveralls -v --coverage_clover='clover.xml' --json_path='coveralls-upload.json'
if: matrix.php-version == '8.1' && matrix.env == 'AUTOLOAD=1'
if: env.COVERALLS_REPO_TOKEN && matrix.php-version == '8.1' && matrix.env == 'AUTOLOAD=1'
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->notPath('tests/TestCase.php');

$config = new PhpCsFixer\Config();
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 9.8.0 - 2022-10-20
* [#1383](https://github.com/stripe/stripe-php/pull/1383) API Updates
* Add support for new values `jp_trn` and `ke_pin` on enum `TaxId.type`
* [#1293](https://github.com/stripe/stripe-php/pull/1293) Install deps in the install step of CI
* [#1291](https://github.com/stripe/stripe-php/pull/1291) Fix: Configure finder for `friendsofphp/php-cs-fixer`

## 9.7.0 - 2022-10-13
* [#1376](https://github.com/stripe/stripe-php/pull/1376) API Updates
* Add support for `network_data` on `Issuing.Authorization`
* [#1374](https://github.com/stripe/stripe-php/pull/1374) Add request_log_url on ErrorObject
* [#1370](https://github.com/stripe/stripe-php/pull/1370) API Updates
* Add support for `created` on `Checkout.Session`

## 9.6.0 - 2022-09-15
* [#1365](https://github.com/stripe/stripe-php/pull/1365) API Updates
* Add support for `from_invoice` and `latest_revision` on `Invoice`
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ test: vendor
.PHONY: test

fmt: vendor
vendor/bin/php-cs-fixer fix -v --using-cache=no .
vendor/bin/php-cs-fixer fix -v --using-cache=no
.PHONY: fmt

fmtcheck: vendor
vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no .
vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no
.PHONY: fmtcheck

phpdoc: vendor/bin/phpdoc
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v201
v203
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.6.0
9.8.0
2 changes: 1 addition & 1 deletion lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send
* Invoices to Customers</a>.
*
* @property string $id Unique identifier for the object.
* @property string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See <a href="https://stripe.com/docs/api/invoices/upcoming">Retrieve an upcoming invoice</a> for more details.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
* @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
Expand Down
22 changes: 9 additions & 13 deletions lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,25 @@ public function capture($id, $params = null, $opts = null)
/**
* Confirm that your customer intends to pay with current or provided payment
* method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
*
* If the selected payment method requires additional authentication steps, the
* PaymentIntent will transition to the <code>requires_action</code> status and
* suggest additional actions via <code>next_action</code>. If payment fails, the
* PaymentIntent will transition to the <code>requires_payment_method</code>
* status. If payment succeeds, the PaymentIntent will transition to the
* <code>succeeded</code> status (or <code>requires_capture</code>, if
* <code>capture_method</code> is set to <code>manual</code>).
*
* If the <code>confirmation_method</code> is <code>automatic</code>, payment may
* be attempted using our <a
* <code>capture_method</code> is set to <code>manual</code>). If the
* <code>confirmation_method</code> is <code>automatic</code>, payment may be
* attempted using our <a
* href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
* the PaymentIntent’s <a
* href="#payment_intent_object-client_secret">client_secret</a>. After
* <code>next_action</code>s are handled by the client, no additional confirmation
* is required to complete the payment.
*
* If the <code>confirmation_method</code> is <code>manual</code>, all payment
* attempts must be initiated using a secret key. If any actions are required for
* the payment, the PaymentIntent will return to the
* <code>requires_confirmation</code> state after those actions are completed. Your
* server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt. Read the <a
* is required to complete the payment. If the <code>confirmation_method</code> is
* <code>manual</code>, all payment attempts must be initiated using a secret key.
* If any actions are required for the payment, the PaymentIntent will return to
* the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate
* the next payment attempt. Read the <a
* href="/docs/payments/payment-intents/web-manual">expanded documentation</a> to
* learn more about manual confirmation.
*
Expand Down
6 changes: 6 additions & 0 deletions lib/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
* API just like a <code>Card</code> object: once chargeable, they can be charged,
* or can be attached to customers.
*
* Stripe doesn't recommend using the deprecated <a
* href="https://stripe.com/docs/api/sources">Sources API</a>. We recommend that
* you adopt the <a
* href="https://stripe.com/docs/api/payment_methods">PaymentMethods API</a>. This
* newer API provides access to our latest features and payment method types.
*
* Related guides: <a href="https://stripe.com/docs/sources">Sources API</a> and <a
* href="https://stripe.com/docs/sources/customers">Sources &amp; Customers</a>.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Stripe
/** @var float Initial delay between retries, in seconds */
private static $initialNetworkRetryDelay = 0.5;

const VERSION = '9.6.0';
const VERSION = '9.8.0';

/**
* @return string the API key used for requests
Expand Down
4 changes: 3 additions & 1 deletion lib/TaxId.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string|\Stripe\Customer $customer ID of the customer.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property string $type Type of the tax ID, one of <code>ae_trn</code>, <code>au_abn</code>, <code>au_arn</code>, <code>bg_uic</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>ca_bn</code>, <code>ca_gst_hst</code>, <code>ca_pst_bc</code>, <code>ca_pst_mb</code>, <code>ca_pst_sk</code>, <code>ca_qst</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>es_cif</code>, <code>eu_oss_vat</code>, <code>eu_vat</code>, <code>gb_vat</code>, <code>ge_vat</code>, <code>hk_br</code>, <code>hu_tin</code>, <code>id_npwp</code>, <code>il_vat</code>, <code>in_gst</code>, <code>is_vat</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>kr_brn</code>, <code>li_uid</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>no_vat</code>, <code>nz_gst</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>si_tin</code>, <code>th_vat</code>, <code>tw_vat</code>, <code>ua_vat</code>, <code>us_ein</code>, or <code>za_vat</code>. Note that some legacy tax IDs have type <code>unknown</code>
* @property string $type Type of the tax ID, one of <code>ae_trn</code>, <code>au_abn</code>, <code>au_arn</code>, <code>bg_uic</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>ca_bn</code>, <code>ca_gst_hst</code>, <code>ca_pst_bc</code>, <code>ca_pst_mb</code>, <code>ca_pst_sk</code>, <code>ca_qst</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>es_cif</code>, <code>eu_oss_vat</code>, <code>eu_vat</code>, <code>gb_vat</code>, <code>ge_vat</code>, <code>hk_br</code>, <code>hu_tin</code>, <code>id_npwp</code>, <code>il_vat</code>, <code>in_gst</code>, <code>is_vat</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>jp_trn</code>, <code>ke_pin</code>, <code>kr_brn</code>, <code>li_uid</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>no_vat</code>, <code>nz_gst</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>si_tin</code>, <code>th_vat</code>, <code>tw_vat</code>, <code>ua_vat</code>, <code>us_ein</code>, or <code>za_vat</code>. Note that some legacy tax IDs have type <code>unknown</code>
* @property string $value Value of the tax ID.
* @property null|\Stripe\StripeObject $verification Tax ID verification information.
*/
Expand Down Expand Up @@ -55,6 +55,8 @@ class TaxId extends ApiResource
const TYPE_IS_VAT = 'is_vat';
const TYPE_JP_CN = 'jp_cn';
const TYPE_JP_RN = 'jp_rn';
const TYPE_JP_TRN = 'jp_trn';
const TYPE_KE_PIN = 'ke_pin';
const TYPE_KR_BRN = 'kr_brn';
const TYPE_LI_UID = 'li_uid';
const TYPE_MX_RFC = 'mx_rfc';
Expand Down

0 comments on commit 98a01bc

Please sign in to comment.