Skip to content

Commit b43767a

Browse files
committed
Update on 2020.03.26.
1 parent d5732e8 commit b43767a

File tree

1,419 files changed

+67874
-34438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,419 files changed

+67874
-34438
lines changed

composer.lock

+1,004-793
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/amzn/amazon-pay-sdk-php/AmazonPay/Client.php

+12-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class Client implements ClientInterface, LoggerAwareInterface
2525
{
26-
const SDK_VERSION = '3.6.0';
26+
const SDK_VERSION = '3.7.1';
2727
const MWS_VERSION = '2013-01-01';
2828
const MAX_ERROR_RETRY = 3;
2929

@@ -316,16 +316,21 @@ public function getUserInfo($accessToken)
316316

317317
// To make sure double encoding doesn't occur decode first and encode again.
318318
$accessToken = urldecode($accessToken);
319-
$url = $this->profileEndpoint . '/auth/o2/tokeninfo?access_token=' . $this->urlEncode($accessToken);
319+
$url = $this->profileEndpoint . '/auth/o2/tokeninfo';
320320

321321
$httpCurlRequest = new HttpCurl($this->config);
322+
$httpCurlRequest->setAccessToken($accessToken);
323+
$httpCurlRequest->setHttpHeader();
322324

323325
$response = $httpCurlRequest->httpGet($url);
324326
$data = json_decode($response);
325327

326328
// Ensure that the Access Token matches either the supplied Client ID *or* the supplied App ID
327329
// Web apps and Mobile apps will have different Client ID's but App ID should be the same
328330
// As long as one of these matches, from a security perspective, we have done our due diligence
331+
if (!isset($data->aud)) {
332+
throw new \Exception('The tokeninfo API call did not succeed');
333+
}
329334
if (($data->aud != $this->config['client_id']) && ($data->app_id != $this->config['app_id'])) {
330335
// The access token does not belong to us
331336
throw new \Exception('The Access Token belongs to neither your Client ID nor App ID');
@@ -361,7 +366,7 @@ private function setParametersAndPost($parameters, $fieldMappings, $requestParam
361366
}
362367

363368
// Ensure that no unexpected type coercions have happened
364-
if ($param === 'capture_now' || $param === 'confirm_now' || $param === 'inherit_shipping_address' || $param === 'request_payment_authorization') {
369+
if ($param === 'capture_now' || $param === 'confirm_now' || $param === 'inherit_shipping_address' || $param === 'request_payment_authorization' || $param === 'expect_immediate_authorization') {
365370
if (!is_bool($value)) {
366371
throw new \Exception($param . ' value ' . $value . ' is of type ' . gettype($value) . ' and should be a boolean value');
367372
}
@@ -622,7 +627,7 @@ public function getOrderReferenceDetails($requestParameters = array())
622627
* @optional requestParameters['created_end_time'] - [String] (Date/Time ISO8601) Limited to 31 days
623628
* @optional requestParameters['sort_order'] - [String] (Ascending/Descending)
624629
* @optional requestParameters['mws_auth_token'] - [String]
625-
* @optional requestParameters['status_list'] - [Array]
630+
* @optional requestParameters['order_status_list'] - [Array]
626631
*/
627632
public function listOrderReference($requestParameters = array())
628633
{
@@ -791,6 +796,7 @@ public function setOrderAttributes($requestParameters = array())
791796
* @optional requestParameters['authorization_amount'] - [String]
792797
* @optional requestParameters['currency_code'] - [String]
793798
* @optional requestParameters['mws_auth_token'] - [String]
799+
* @optional requestParameters['expect_immediate_authorization'] - [Boolean] Default value is false
794800
*/
795801
public function confirmOrderReference($requestParameters = array())
796802
{
@@ -805,7 +811,8 @@ public function confirmOrderReference($requestParameters = array())
805811
'failure_url' => 'FailureUrl',
806812
'authorization_amount' => 'AuthorizationAmount.Amount',
807813
'currency_code' => 'AuthorizationAmount.CurrencyCode',
808-
'mws_auth_token' => 'MWSAuthToken'
814+
'mws_auth_token' => 'MWSAuthToken',
815+
'expect_immediate_authorization' => 'ExpectImmediateAuthorization'
809816
);
810817

811818
if (isset($requestParameters['authorization_amount']) && !isset($requestParameters['currency_code'])) {

vendor/amzn/amazon-pay-sdk-php/AmazonPay/ClientInterface.php

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public function setOrderAttributes($requestParameters = array());
156156
* @optional requestParameters['authorization_amount'] - [String]
157157
* @optional requestParameters['currency_code'] - [String]
158158
* @optional requestParameters['mws_auth_token'] - [String]
159+
* @optional requestParameters['expect_immediate_authorization'] - [Boolean] Default value is false
159160
*/
160161
public function confirmOrderReference($requestParameters = array());
161162

vendor/amzn/amazon-pay-sdk-php/AmazonPay/HttpCurl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function httpGet($url, $userAgent = null)
102102

103103
// Setting the HTTP header with the Access Token only for Getting user info
104104
if ($this->header) {
105-
$this->headerArray[] = 'Authorization: bearer ' . $this->accessToken;
105+
$this->headerArray[] = 'x-amz-access-token : ' . $this->accessToken;
106106
}
107107

108108
$response = $this->execute($ch);

vendor/amzn/amazon-pay-sdk-php/CHANGES.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
3.7.1 - March 2021
2+
- Fixed Secuity issue - Sending access token via HTTP header instead of query string in URL for GetUserInfo API
3+
4+
3.7.0 - January 2021
5+
- Added additional attribute (expect_immediate_authorization) to ConfirmOrderReference. This value can be set to true or false (Boolean). See Amazon Pay Strong Customer Authentication (SCA) Upgrade Integration Guide for more information.
6+
17
3.6.0 - November 2019
28
- Add GetMerchantNotificationConfiguration API call
39
- Add SetMerchantNotificationConfiguration API call

vendor/amzn/amazon-pay-sdk-php/NOTICE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*-*-**-***-*****-********-*************
22
Amazon Pay SDK (PHP)
3-
Copyright 2013-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
Licensed under the Apache License, Version 2.0 (the "License");
55
*-*-**-***-*****-********-*************
66

vendor/amzn/amazon-pay-sdk-php/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ $requestParameters['notification_configuration_list'] = $notificationConfigurati
335335
// $requestParameters['notification_configuration_list'] = array('https://dev.null/ipn' => array('ALL'));
336336

337337
// if you are calling on behalf of another merhcant using delegated access, be sure to set the merchant ID and auth token:
338-
// $requestParameters['merchant_id'] = 'A3URCZVLDMDI45';
339-
// $requestParameters['mws_auth_token'] = 'amzn.mws.d6ac8f2d-6a5f-b06a-bc12-1d0dbf4ca63d';
338+
// $requestParameters['merchant_id'] = 'THE_MERCHANT_ID';
339+
// $requestParameters['mws_auth_token'] = 'THE_MWS_AUTH_TOKEN';
340340

341341
$response = $client->setMerchantNotificationConfiguration($requestParameters);
342342
if ($response->toArray()['ResponseStatus'] !== '200') {
@@ -387,6 +387,7 @@ and the amount captured by making the `capture` API call after the shipment is c
387387
| Platform ID | `platform_id` | no | Platform ID of the Solution provider |
388388
| Custom Information | `custom_information` | no | Any custom string |
389389
| MWS Auth Token | `mws_auth_token` | no | MWS Auth Token required if API call is made on behalf of the seller |
390+
| ExpectImmediateAuthorization | `expect_immediate_authorization` | no | Setting value to true, will make OrderReferenceObject to be closed automatically in case no authorization is triggered within 60 minutes |
390391

391392
```php
392393
// Create an array that will contain the parameters for the charge API call

vendor/amzn/amazon-pay-sdk-php/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amzn/amazon-pay-sdk-php",
33
"type": "library",
44
"description": "Amazon Pay SDK (PHP)",
5-
"version": "3.6.0",
5+
"version": "3.7.1",
66
"keywords": [
77
"amazon",
88
"pay",

vendor/amzn/amazon-pay-sdk-php/tst/unit/ClientTest.php

+34-4
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ public function testConfirmOrderReferenceWithAllSCA()
362362
'success_url' => 'SuccessUrl',
363363
'failure_url' => 'FailureUrl',
364364
'authorization_amount' => 'AuthorizationAmount.Amount',
365-
'currency_code' => 'AuthorizationAmount.CurrencyCode'
365+
'currency_code' => 'AuthorizationAmount.CurrencyCode',
366+
'expect_immediate_authorization' => 'ExpectImmediateAuthorization'
366367
);
367368

368369
$action = 'ConfirmOrderReference';
@@ -389,7 +390,8 @@ public function testConfirmOrderReferenceWithAllButCurrencyCodeSCA()
389390
'mws_auth_token' => 'MWSAuthToken',
390391
'success_url' => 'SuccessUrl',
391392
'failure_url' => 'FailureUrl',
392-
'authorization_amount' => 'AuthorizationAmount.Amount'
393+
'authorization_amount' => 'AuthorizationAmount.Amount',
394+
'expect_immediate_authorization' => 'ExpectImmediateAuthorization'
393395
);
394396

395397
$action = 'ConfirmOrderReference';
@@ -415,7 +417,8 @@ public function testConfirmOrderReferenceWithUrlSCA()
415417
'amazon_order_reference_id' => 'AmazonOrderReferenceId',
416418
'mws_auth_token' => 'MWSAuthToken',
417419
'success_url' => 'SuccessUrl',
418-
'failure_url' => 'FailureUrl'
420+
'failure_url' => 'FailureUrl',
421+
'expect_immediate_authorization' => 'ExpectImmediateAuthorization'
419422
);
420423

421424
$action = 'ConfirmOrderReference';
@@ -457,6 +460,33 @@ public function testConfirmOrderReferenceWithoutSCA()
457460
$this->assertEquals($apiParametersString, $expectedStringParams);
458461
}
459462

463+
/*
464+
* Test to validate ConfirmOrderReference API with ExpectImmediateAuthorization optional value as null
465+
* It is expected to accept only Boolean value (i.e true or false)
466+
*/
467+
public function testConfirmOrderReferenceWithExpectImmediateAuthorizationValueAsNull() {
468+
$client = new Client($this->configParams);
469+
$fieldMappings = array(
470+
'merchant_id' => 'SellerId',
471+
'amazon_order_reference_id' => 'AmazonOrderReferenceId',
472+
'mws_auth_token' => 'MWSAuthToken',
473+
'success_url' => 'SuccessUrl',
474+
'failure_url' => 'FailureUrl',
475+
'authorization_amount' => 'AuthorizationAmount.Amount',
476+
'expect_immediate_authorization' => 'ExpectImmediateAuthorization'
477+
);
478+
$action = 'ConfirmOrderReference';
479+
$parameters = $this->setParametersAndPost($fieldMappings, $action);
480+
$apiCallParams = $parameters['apiCallParams'];
481+
$apiCallParams['expect_immediate_authorization'] = null;
482+
try{
483+
$response = $client->confirmOrderReference($apiCallParams);
484+
}
485+
catch (\Exception $expected) {
486+
$this->assertRegExp('/should be a boolean value/i', strval($expected));
487+
}
488+
}
489+
460490
public function testCancelOrderReference()
461491
{
462492
$client = new Client($this->configParams);
@@ -1227,7 +1257,7 @@ private function setParametersAndPost($fieldMappings, $action)
12271257
$expectedParameters['Action'] = $action;
12281258

12291259
foreach ($fieldMappings as $parm => $value) {
1230-
if ($parm === 'capture_now' || $parm === 'confirm_now' || $parm === 'inherit_shipping_address' || $parm === 'request_payment_authorization') {
1260+
if ($parm === 'capture_now' || $parm === 'confirm_now' || $parm === 'inherit_shipping_address' || $parm === 'request_payment_authorization' || $parm === 'expect_immediate_authorization') {
12311261
$expectedParameters[$value] = true;
12321262
$apiCallParams[$parm] = true;
12331263
} elseif ($parm === 'order_item_categories') {

vendor/aws/aws-sdk-php/composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"require": {
1919
"php": ">=5.5",
2020
"guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0",
21-
"guzzlehttp/psr7": "^1.4.1",
22-
"guzzlehttp/promises": "^1.0",
23-
"mtdowling/jmespath.php": "^2.5",
21+
"guzzlehttp/psr7": "^1.7.0",
22+
"guzzlehttp/promises": "^1.4.0",
23+
"mtdowling/jmespath.php": "^2.6",
2424
"ext-pcre": "*",
2525
"ext-json": "*",
2626
"ext-simplexml": "*"

vendor/aws/aws-sdk-php/src/AccessAnalyzer/AccessAnalyzerClient.php

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* This client is used to interact with the **Access Analyzer** service.
88
* @method \Aws\Result applyArchiveRule(array $args = [])
99
* @method \GuzzleHttp\Promise\Promise applyArchiveRuleAsync(array $args = [])
10+
* @method \Aws\Result createAccessPreview(array $args = [])
11+
* @method \GuzzleHttp\Promise\Promise createAccessPreviewAsync(array $args = [])
1012
* @method \Aws\Result createAnalyzer(array $args = [])
1113
* @method \GuzzleHttp\Promise\Promise createAnalyzerAsync(array $args = [])
1214
* @method \Aws\Result createArchiveRule(array $args = [])
@@ -15,6 +17,8 @@
1517
* @method \GuzzleHttp\Promise\Promise deleteAnalyzerAsync(array $args = [])
1618
* @method \Aws\Result deleteArchiveRule(array $args = [])
1719
* @method \GuzzleHttp\Promise\Promise deleteArchiveRuleAsync(array $args = [])
20+
* @method \Aws\Result getAccessPreview(array $args = [])
21+
* @method \GuzzleHttp\Promise\Promise getAccessPreviewAsync(array $args = [])
1822
* @method \Aws\Result getAnalyzedResource(array $args = [])
1923
* @method \GuzzleHttp\Promise\Promise getAnalyzedResourceAsync(array $args = [])
2024
* @method \Aws\Result getAnalyzer(array $args = [])
@@ -23,6 +27,10 @@
2327
* @method \GuzzleHttp\Promise\Promise getArchiveRuleAsync(array $args = [])
2428
* @method \Aws\Result getFinding(array $args = [])
2529
* @method \GuzzleHttp\Promise\Promise getFindingAsync(array $args = [])
30+
* @method \Aws\Result listAccessPreviewFindings(array $args = [])
31+
* @method \GuzzleHttp\Promise\Promise listAccessPreviewFindingsAsync(array $args = [])
32+
* @method \Aws\Result listAccessPreviews(array $args = [])
33+
* @method \GuzzleHttp\Promise\Promise listAccessPreviewsAsync(array $args = [])
2634
* @method \Aws\Result listAnalyzedResources(array $args = [])
2735
* @method \GuzzleHttp\Promise\Promise listAnalyzedResourcesAsync(array $args = [])
2836
* @method \Aws\Result listAnalyzers(array $args = [])
@@ -43,5 +51,7 @@
4351
* @method \GuzzleHttp\Promise\Promise updateArchiveRuleAsync(array $args = [])
4452
* @method \Aws\Result updateFindings(array $args = [])
4553
* @method \GuzzleHttp\Promise\Promise updateFindingsAsync(array $args = [])
54+
* @method \Aws\Result validatePolicy(array $args = [])
55+
* @method \GuzzleHttp\Promise\Promise validatePolicyAsync(array $args = [])
4656
*/
4757
class AccessAnalyzerClient extends AwsClient {}

vendor/aws/aws-sdk-php/src/Acm/AcmClient.php

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @method \GuzzleHttp\Promise\Promise describeCertificateAsync(array $args = [])
1515
* @method \Aws\Result exportCertificate(array $args = [])
1616
* @method \GuzzleHttp\Promise\Promise exportCertificateAsync(array $args = [])
17+
* @method \Aws\Result getAccountConfiguration(array $args = [])
18+
* @method \GuzzleHttp\Promise\Promise getAccountConfigurationAsync(array $args = [])
1719
* @method \Aws\Result getCertificate(array $args = [])
1820
* @method \GuzzleHttp\Promise\Promise getCertificateAsync(array $args = [])
1921
* @method \Aws\Result importCertificate(array $args = [])
@@ -22,6 +24,8 @@
2224
* @method \GuzzleHttp\Promise\Promise listCertificatesAsync(array $args = [])
2325
* @method \Aws\Result listTagsForCertificate(array $args = [])
2426
* @method \GuzzleHttp\Promise\Promise listTagsForCertificateAsync(array $args = [])
27+
* @method \Aws\Result putAccountConfiguration(array $args = [])
28+
* @method \GuzzleHttp\Promise\Promise putAccountConfigurationAsync(array $args = [])
2529
* @method \Aws\Result removeTagsFromCertificate(array $args = [])
2630
* @method \GuzzleHttp\Promise\Promise removeTagsFromCertificateAsync(array $args = [])
2731
* @method \Aws\Result renewCertificate(array $args = [])

vendor/aws/aws-sdk-php/src/Arn/ArnParser.php

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace Aws\Arn;
33

44
use Aws\Arn\S3\AccessPointArn as S3AccessPointArn;
5+
use Aws\Arn\ObjectLambdaAccessPointArn;
56
use Aws\Arn\S3\OutpostsBucketArn;
67
use Aws\Arn\S3\RegionalBucketArn;
78
use Aws\Arn\S3\OutpostsAccessPointArn;
@@ -35,6 +36,9 @@ public static function isArn($string)
3536
public static function parse($string)
3637
{
3738
$data = Arn::parse($string);
39+
if ($data['service'] === 's3-object-lambda') {
40+
return new ObjectLambdaAccessPointArn($string);
41+
}
3842
$resource = self::explodeResourceComponent($data['resource']);
3943
if ($resource[0] === 'outpost') {
4044
if (isset($resource[2]) && $resource[2] === 'bucket') {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
namespace Aws\Arn;
3+
4+
/**
5+
* This class represents an S3 Object bucket ARN, which is in the
6+
* following format:
7+
*
8+
* @internal
9+
*/
10+
class ObjectLambdaAccessPointArn extends AccessPointArn
11+
{
12+
/**
13+
* Parses a string into an associative array of components that represent
14+
* a ObjectLambdaAccessPointArn
15+
*
16+
* @param $string
17+
* @return array
18+
*/
19+
public static function parse($string)
20+
{
21+
$data = parent::parse($string);
22+
return parent::parseResourceTypeAndId($data);
23+
}
24+
25+
/**
26+
*
27+
* @param array $data
28+
*/
29+
protected static function validate(array $data)
30+
{
31+
parent::validate($data);
32+
self::validateRegion($data, 'S3 Object Lambda ARN');
33+
self::validateAccountId($data, 'S3 Object Lambda ARN');
34+
}
35+
}

vendor/aws/aws-sdk-php/src/Arn/ResourceTypeAndIdTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function getResourceId()
1616
return $this->data['resource_id'];
1717
}
1818

19-
private static function parseResourceTypeAndId(array $data)
19+
protected static function parseResourceTypeAndId(array $data)
2020
{
2121
$resourceData = preg_split("/[\/:]/", $data['resource'], 2);
2222
$data['resource_type'] = isset($resourceData[0])

vendor/aws/aws-sdk-php/src/Arn/S3/AccessPointArn.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AccessPointArn extends BaseAccessPointArn implements AccessPointArnInterfa
1616
*
1717
* @param array $data
1818
*/
19-
protected static function validate(array $data)
19+
public static function validate(array $data)
2020
{
2121
parent::validate($data);
2222
if ($data['service'] !== 's3') {

vendor/aws/aws-sdk-php/src/Arn/S3/OutpostsAccessPointArn.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private static function parseOutpostData(array $data)
6464
*
6565
* @param array $data
6666
*/
67-
protected static function validate(array $data)
67+
public static function validate(array $data)
6868
{
6969
Arn::validate($data);
7070

vendor/aws/aws-sdk-php/src/Arn/S3/OutpostsBucketArn.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static function parseOutpostData(array $data)
6262
*
6363
* @param array $data
6464
*/
65-
protected static function validate(array $data)
65+
public static function validate(array $data)
6666
{
6767
Arn::validate($data);
6868

0 commit comments

Comments
 (0)