-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1127 from BearGroup/release/5.13.0
Release/5.13.0
- Loading branch information
Showing
59 changed files
with
1,130 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace Amazon\Pay\Model\Resolver; | ||
|
||
use Amazon\Pay\Model\CheckoutSessionManagement; | ||
use Magento\Framework\GraphQl\Config\Element\Field; | ||
use Magento\Framework\GraphQl\Query\Resolver\ContextInterface; | ||
use Magento\Framework\GraphQl\Query\Resolver\Value; | ||
use Magento\Framework\GraphQl\Query\ResolverInterface; | ||
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; | ||
|
||
class CheckoutSessionConfig implements ResolverInterface | ||
{ | ||
|
||
/** | ||
* @var CheckoutSessionManagement | ||
*/ | ||
private $checkoutSessionManagement; | ||
|
||
/** | ||
* @param CheckoutSessionManagement $checkoutSessionManagement | ||
*/ | ||
public function __construct( | ||
CheckoutSessionManagement $checkoutSessionManagement | ||
) { | ||
$this->checkoutSessionManagement = $checkoutSessionManagement; | ||
} | ||
|
||
/** | ||
* @param Field $field | ||
* @param $context | ||
* @param ResolveInfo $info | ||
* @param array|null $value | ||
* @param array|null $args | ||
* @return array|Value|mixed | ||
*/ | ||
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) | ||
{ | ||
$cartId = $args['cartId'] ?? null; | ||
|
||
$response = $this->checkoutSessionManagement->getConfig($cartId); | ||
return array_shift($response); | ||
} | ||
} |
Oops, something went wrong.