for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Korobovn\CloudPayments\Message\Strategy\Specification;
/**
* @see https://developers.cloudpayments.ru/#oplata-po-kriptogramme
*/
class TransactionAcceptedSpecification implements SpecificationInterface
{
* {@inheritdoc}
public function isSatisfiedBy(array $response): bool
return isset($response['Model']['ReasonCode']) &&
$response['Model']['ReasonCode'] === 0 &&
(new IsSuccessSpecification)->isSatisfiedBy($response) &&
(new NotMessageSpecification)->isSatisfiedBy($response);
}