マルチキャプチャーを有効にする
同じオーソリを複数回キャプチャーします。
デフォルトでは、オーソリの一部をキャプチャーすると、残りの金額はリリースされます。最初のキャプチャーの後、残りの注文額をキャプチャーするには新しい支払いを作成する必要がありますが、これは成功しない可能性があります。Stripe のマルチキャプチャー機能を使用すると、同じ支払いオーソリに対して複数の分割払いをキャプチャーできます。
IC+ 機能
Multicapture is an IC+ feature. If you’re on blended Stripe pricing and want access to this feature, contact Stripe Support.
Stripe モジュールはデフォルトでマルチキャプチャーをサポートしています。このガイドでは、カスタマイズによって有効化する方法をご紹介します。
新しいモジュールを作成する
次のディレクトリー構造で新しいモジュールを作成します。Vendor
をベンダー名に置き換えます。
app/code/Vendor/StripeCustomizations/ ├── etc/ │ ├── module.xml │ └── config.xml ├── registration.php
registration.
内で、モジュールを Magento に登録します。
<?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Vendor_StripeCustomizations', __DIR__ );
etc/module.
内でモジュールを定義し、依存関係を設定して Stripe モジュールの後に読み込まれるようにします。
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Vendor_StripeCustomizations" setup_version="1.0.0"> <sequence> <module name="StripeIntegration_Payments"/> </sequence> </module> </config>
etc/config.
内で、Stripe モジュールの以下の設定を上書きします。
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> <default> <stripe_settings> <multicapture_enabled>1</multicapture_enabled> </stripe_settings> </default> </config>
以下のモジュールを有効化します。
php bin/magento module:enable Vendor_StripeCustomizations php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento cache:flush