protected function AcceptJsPaymentMethodTest::createApiConfiguration in Commerce Authorize.Net 8
Creates an API configuration.
Return value
\CommerceGuys\AuthNet\Configuration The API configuration.
2 calls to AcceptJsPaymentMethodTest::createApiConfiguration()
- AcceptJsPaymentMethodTest::createDataDescriptor in tests/
src/ Kernel/ AcceptJsPaymentMethodTest.php - Creates data descriptor information.
- AcceptJsPaymentMethodTest::testUpdatePaymentMethod in tests/
src/ Kernel/ AcceptJsPaymentMethodTest.php - Tests creating the payment method for an authenticated users.
File
- tests/
src/ Kernel/ AcceptJsPaymentMethodTest.php, line 78
Class
- AcceptJsPaymentMethodTest
- Tests creating a payment method with AcceptJS.
Namespace
Drupal\Tests\commerce_authnet\KernelCode
protected function createApiConfiguration() {
$configuration = $this->gateway
->getPlugin()
->getConfiguration();
return new Configuration([
'sandbox' => $this->gateway
->getPlugin()
->getMode() == 'test',
'api_login' => $configuration['api_login'],
'transaction_key' => $configuration['transaction_key'],
'client_key' => $configuration['client_key'],
'request_mode' => 'json',
]);
}