Update checkout processor return
This commit is contained in:
@@ -6,7 +6,6 @@ use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProcessorInterface;
|
||||
use App\Entity\GatewayCheckout;
|
||||
use App\Library\Economy\Payment\GatewayLocator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
|
||||
class GatewayCheckoutProcessor implements ProcessorInterface
|
||||
@@ -15,11 +14,12 @@ class GatewayCheckoutProcessor implements ProcessorInterface
|
||||
#[Autowire(service: 'api_platform.doctrine.orm.state.persist_processor')]
|
||||
private ProcessorInterface $innerProcessor,
|
||||
private GatewayLocator $gatewayLocator,
|
||||
private EntityManagerInterface $entityManager,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param GatewayCheckout $data
|
||||
*
|
||||
* @return GatewayCheckout
|
||||
*/
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = [])
|
||||
{
|
||||
@@ -28,6 +28,6 @@ class GatewayCheckoutProcessor implements ProcessorInterface
|
||||
$gateway = $this->gatewayLocator->getGatewayOf($checkout);
|
||||
$checkout = $gateway->process($checkout);
|
||||
|
||||
return $this->innerProcessor->process($data, $operation, $uriVariables, $context);
|
||||
return $this->innerProcessor->process($checkout, $operation, $uriVariables, $context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user