安裝Payment Services

若要開始使用Adobe Commerce和Magento Open Source的支付服務,您必須完成一些入門步驟。

INFO
如需詳細資訊,請參閱我們的為Adobe Commerce設定 Payment Services 影片。

下載並安裝Adobe Commerce和Magento Open Source的Payment Services擴充功能是使用Payment Services的先決條件步驟。

Payment Services延伸模組管理員檢視

下載擴充功能

您必須先從Commerce Marketplace下載擴充功能,才能進行安裝。

  1. 導覽至Commerce Marketplace🔗中的付款服務延伸模組。
  2. 若要選擇版本和版本,請將​ Edition ​和​ Your store version ​切換為您偏好的選擇。
  3. 按一下​ Add to Cart
  4. 完成簽出,然後按一下​ Place Order
  5. 檢查與您的Marketplace下載相關聯的電子郵件,以取得訂單確認和詳細資訊。

安裝擴充功能

您可以在雲端基礎結構和內部部署執行個體上同時安裝Adobe Commerce的Payment Services擴充功能,這些執行個體連結到您在註冊程式中提供的Commerce帳戶mageid
Magento Open Source個客戶使用內部部署指示。

Composer在初始安裝Adobe Commerce期間使用這些金鑰,或在先前未將Composer金鑰儲存到auth.json檔案的情況下。

請參閱取得您的驗證金鑰,以取得有關取得Composer金鑰的詳細資訊。

請參閱安裝擴充功能,以取得下載和安裝擴充功能前需考量的詳細資訊。

雲端基礎結構上的Adobe Commerce

此方法用於安裝Commerce Cloud執行個體的Payment Services延伸模組。

  1. 更新您的composer.json檔案:

    code language-bash
    composer require magento/payment-services --no-update
    
  2. 更新相依性並安裝擴充功能:

    code language-bash
    composer update magento/payment-services --with-dependencies
    

    使用composer update命令更新所有根相依性。

  3. 提交並推送您的變更。

內部部署和其他設定

此方法用於為內部部署執行個體和Magento Open Source客戶安裝Payment Services擴充功能。

  1. 若要取得擴充功能,請執行以下命令:

    code language-bash
    composer require magento/payment-services --no-update
    
  2. 更新相依性並安裝擴充功能:

    code language-bash
    composer update magento/payment-services --with-dependencies
    

    使用composer update命令更新所有根相依性。

  3. 升級您的執行個體:

    code language-bash
    bin/magento setup:upgrade
    
  4. 清除快取:

    code language-bash
    bin/magento cache:clean
    
  5. 提交變更。

  6. 若要確保已部署認可的程式碼,請更新您的執行個體。

升級擴充功能

當新版的Payment Services發行時,您可以輕鬆升級擴充功能。

  1. 若要取得最新版本的套件:

    code language-bash
    composer update magento/payment-services --with-dependencies
    

    使用composer update命令更新所有根相依性。

  2. 提交並推送您的變更。

疑難排解

嘗試安裝Payment Services擴充功能時,您可能會看到錯誤。 請使用下列疑難排解方法來解決錯誤。

不正確的撰寫器索引鍵

如果您看到下列錯誤,指出您的撰寫器索引鍵不正確:

Could not find a matching version of package magento/payment-services. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

確認您的撰寫器金鑰有效,並且您擁有其他Magento套件的存取權。

若要檢視已設定的撰寫器金鑰:

  1. 尋找auth.json檔案的位置:

    code language-bash
    composer config --global home
    
  2. 檢視auth.json檔案:

    code language-bash
    cat /path/to/auth.json
    
  3. 檢視哪些金鑰與您的Commerce帳戶MageID相關聯。

PHP的記憶體不足

如果看到以下錯誤,表示您沒有足夠的記憶體來使用PHP:

Fatal error: Allowed memory size of 2146435072 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

php.ini中增加環境上PHP的記憶體限制

或者,您可以使用此命令指定記憶體限制: php -d memory_limit=-1 [path to composer]/composer require magento/payment-services

例如:

php -d memory_limit=-1 vendor/bin/composer require magento/payment-services
recommendation-more-help
87189544-c8b9-4aef-af07-ed3578763c38