TransactionSale.php 569 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Braintree\Gateway\Http\Client;
  7. /**
  8. * Class TransactionSale
  9. */
  10. class TransactionSale extends AbstractTransaction
  11. {
  12. /**
  13. * @inheritdoc
  14. */
  15. protected function process(array $data)
  16. {
  17. $storeId = $data['store_id'] ?? null;
  18. // sending store id and other additional keys are restricted by Braintree API
  19. unset($data['store_id']);
  20. return $this->adapterFactory->create($storeId)->sale($data);
  21. }
  22. }