Closed xorgxx closed 8 years ago
here is my config (SF2.8.6, "lexik/maintenance-bundle": "dev-master",) :
parameters:
lexik_paybox.response_listener: 'EcommerceBundle\Listener\PayboxResponseListener'
services:
lexik_paybox.response_listener:
class: %lexik_paybox.response_listener%
arguments:
- %kernel.root_dir%
- @filesystem
- @@ecommerce_payment_service
tags:
- { name: kernel.event_listener, event: paybox.ipn_response, method: onPayboxIpnResponse }
<?php
/**
* Created by PhpStorm.
* User: Zorg
* Date: 02/06/2016
* Time: 08:11
*/
namespace EcommerceBundle\Listener;
use EcommerceBundle\Controller\Services\PaymentService;
use Symfony\Component\Filesystem\Filesystem;
use Lexik\Bundle\PayboxBundle\Event\PayboxResponseEvent;
/**
* Simple listener that create a file for each ipn call.
*/
class PayboxResponseListener
{
private $rootDir;
private $filesystem;
private $paymentService;
/**
* Constructor.
*
* @param string $rootDir
* @param Filesystem $filesystem
* @param PaymentService $paymentService
*/
public function __construct($rootDir, Filesystem $filesystem, PaymentService $paymentService)
{
$this->rootDir = $rootDir;
$this->filesystem = $filesystem;
$this->paymentService = $paymentService;
}
/**
* Creates a txt file containing all parameters for each IPN.
*
* @param PayboxResponseEvent $event
*/
public function onPayboxIpnResponse(PayboxResponseEvent $event)
{
$Data = $event->getData();
$Verified = $event->isVerified() ? 'OK' : 'KO';
$this->paymentService->digestPaymentIPN($Data, $Verified);
}
}
How i can try the 'PayboxResponseListener' in local dev mode ? mean no ip external, no domain external.
Catchable Fatal Error: Argument 1 passed to Lexik\Bundle\PayboxBundle\Paybox\System\Tools::stringify() must be of the type array, null given .....
so after try to debug i find that the method POST das not get any think for paybox return !! but method GET working well.
....
hi i try to make pre-prod test and i get alway :
thank for help