lexik / LexikPayboxBundle

LexikPayboxBundle eases the implementation of the Paybox payment system
MIT License
40 stars 47 forks source link

Signature is invalid #76

Closed xorgxx closed 8 years ago

xorgxx commented 8 years ago

hi i try to make pre-prod test and i get alway :

[2016-07-13 11:16:25] request.INFO: Matched route "lexik_paybox_ipn". {"route_parameters":{"_controller":"Lexik\\Bundle\\PayboxBundle\\Controller\\DefaultController::ipnAction","_locale":"fr","time":"1468408561","_route":"lexik_paybox_ipn"},"request_uri":"http://www.xxxxxx.com/fr/payment-ipn/1468408561"} []
[2016-07-13 11:16:25] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2016-07-13 11:16:25] payment.INFO: New IPN call. [] []
[2016-07-13 11:16:25] payment.INFO: NumTr=8155105 [] []
[2016-07-13 11:16:25] payment.INFO: Mt=32600 [] []
[2016-07-13 11:16:25] payment.INFO: Ref=TPSa-44c079476f@1468408561 [] []
[2016-07-13 11:16:25] payment.INFO: Auto=XXXXXX [] []
[2016-07-13 11:16:25] payment.INFO: Erreur=00000 [] []
[2016-07-13 11:16:25] payment.INFO: Sign=hOoEFNHwbAF3X2IzLEO/XyiK67gTPysXglMyfb3Tnek56S1jRA9ihAt93sPyEUP/f8idmXx4MhYAfrJ0H37QouY5eFYZRnZQZ+BH4XlJaRUf3LAyYfT4Lg2mPXfRIG97Dl4QjY9YP7Gjho25BaHtR29FeufJ6U5LXg+TktZMPh0= [] []
[2016-07-13 11:16:25] payment.INFO: NumTr=8155105&Mt=32600&Ref=TPSa-44c079476f%401468408561&Auto=XXXXXX&Erreur=00000 [] []
[2016-07-13 11:16:25] payment.INFO: hOoEFNHwbAF3X2IzLEO/XyiK67gTPysXglMyfb3Tnek56S1jRA9ihAt93sPyEUP/f8idmXx4MhYAfrJ0H37QouY5eFYZRnZQZ+BH4XlJaRUf3LAyYfT4Lg2mPXfRIG97Dl4QjY9YP7Gjho25BaHtR29FeufJ6U5LXg+TktZMPh0= [] []
[2016-07-13 11:16:25] payment.ERROR: Signature is invalid. [] []

thank for help

xorgxx commented 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);            

        }
    }
xorgxx commented 8 years ago

How i can try the 'PayboxResponseListener' in local dev mode ? mean no ip external, no domain external.

xorgxx commented 8 years ago

Catchable Fatal Error: Argument 1 passed to Lexik\Bundle\PayboxBundle\Paybox\System\Tools::stringify() must be of the type array, null given .....

xorgxx commented 8 years ago

so after try to debug i find that the method POST das not get any think for paybox return !! but method GET working well.

xorgxx commented 8 years ago

....