関数
Update::__construct( Aivec\Welcart\SettlementModules\AmazonPay\AmazonPay $module, string $checkoutResultUrl, bool $canHandlePendingAuthorization = false, string $paymentIntent = 'Authorize' )
Sets $module
member var with dependency injection.
パラメータ パラメータ
- $module
(AmazonPay) (必須)
- $checkoutResultUrl
(文字列) (必須)
- $canHandlePendingAuthorization
(bool) (任意) Default:
false
- $paymentIntent
(文字列) (任意)
Authorize
,AuthorizeWithCapture
, orConfirm
.Authorize
by default
ファイル: src/API/CheckoutSession/Update.php
public function __construct( AmazonPay $module, $checkoutResultUrl, $canHandlePendingAuthorization = false, $paymentIntent = 'Authorize' ) { if ($canHandlePendingAuthorization === true && $paymentIntent === 'AuthorizeWithCapture') { throw new InvalidArgumentException( "paymentIntent cannot be 'AuthorizeWithCapture' when canHandlePendingAuthorization is true" ); } $this->module = $module; $this->checkoutResultUrl = $checkoutResultUrl; $this->canHandlePendingAuthorization = $canHandlePendingAuthorization; $this->paymentIntent = $paymentIntent; parent::__construct(); $this->populate(); }