Skip to content

Commit

Permalink
Fix vault capture procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
renatocason committed Sep 14, 2017
1 parent 3eb624e commit 93ce809
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
7 changes: 1 addition & 6 deletions Gateway/Command/CaptureStrategyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ class CaptureStrategyCommand implements CommandInterface
*/
const CAPTURE = 'charge_capture';

/**
* Vault capture command
*/
const VAULT_CAPTURE = 'vault_capture';

/**
* @var CommandPoolInterface
*/
Expand Down Expand Up @@ -130,7 +125,7 @@ private function getCommand(OrderPaymentInterface $payment)
}

// Process capture for payment via Vault
return self::VAULT_CAPTURE;
return self::CAPTURE;
}

/**
Expand Down
13 changes: 1 addition & 12 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<item name="capture" xsi:type="string">AuneStripeCaptureStrategyCommand</item>
<item name="charge_capture" xsi:type="string">AuneStripeCaptureCommand</item>
<item name="vault_authorize" xsi:type="string">AuneStripeVaultAuthorizeCommand</item>
<item name="vault_capture" xsi:type="string">AuneStripeVaultCaptureCommand</item>
<item name="vault_sale" xsi:type="string">AuneStripeVaultSaleCommand</item>
<item name="void" xsi:type="string">AuneStripeRefundCommand</item>
<item name="refund" xsi:type="string">AuneStripeRefundCommand</item>
<item name="cancel" xsi:type="string">AuneStripeRefundCommand</item>
Expand Down Expand Up @@ -183,17 +183,6 @@
</argument>
</arguments>
</virtualType>
<!-- Vault Capture command -->
<virtualType name="AuneStripeVaultCaptureCommand" type="Magento\Payment\Gateway\Command\GatewayCommand">
<arguments>
<argument name="transferFactory" xsi:type="object">Aune\Stripe\Gateway\Http\TransferFactory</argument>
<argument name="client" xsi:type="object">Aune\Stripe\Gateway\Http\Client\ChargeCapture</argument>
<argument name="requestBuilder" xsi:type="object">Aune\Stripe\Gateway\Request\ChargeCaptureDataBuilder</argument>
<argument name="handler" xsi:type="object">Aune\Stripe\Gateway\Response\ChargeIdHandler</argument>
<argument name="validator" xsi:type="object">Aune\Stripe\Gateway\Validator\ResponseValidator</argument>
</arguments>
</virtualType>
<!-- END commands -->

<!-- Value handlers infrastructure -->
<type name="Aune\Stripe\Gateway\Response\VaultDetailsHandler">
Expand Down

0 comments on commit 93ce809

Please sign in to comment.