lexik / LexikPayboxBundle

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

payment strait to paybox not using render and form ? #73

Closed xorgxx closed 8 years ago

xorgxx commented 8 years ago

Hi thank for this bundle how i hope will help me.

so here is my question, i want to send strait my request to the paybox server from my controller, i dont want to pass by render (in controller) and form.

            $paybox = $this->get('lexik_paybox.request_handler');
            $paybox->setParameters(array(
                'PBX_CMD'          => 'CMD'.time(),
                'PBX_DEVISE'       => '978',
                'PBX_PORTEUR'      => 'test@paybox.com',
                'PBX_RETOUR'       => 'Mt:M;Ref:R;Auto:A;Erreur:E',
                'PBX_TOTAL'        => '1000',
                'PBX_TYPEPAIEMENT' => 'CARTE',
                'PBX_TYPECARTE'    => 'CB',
                'PBX_EFFECTUE'     => $this->generateUrl('PayBox_return', array('status' => 'success'), true),
                'PBX_REFUSE'       => $this->generateUrl('PayBox_return', array('status' => 'denied'), true),
                'PBX_ANNULE'       => $this->generateUrl('PayBox_return', array('status' => 'canceled'), true),
                'PBX_RUF1'         => 'POST',
                'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time()), true),
            ));

after this send all to paybox.

how i can do this?

xorgxx commented 8 years ago

Hi, Are it can be secure to send payment with this form :

            return $this->render( 'LexikPayboxBundle:Sample:index.html.twig', array(
                    'url'  => $paybox->getUrl(),
                    'form' => $paybox->getForm()->createView(),
                )
            );

if press ctrl+u in firefox i get all detail before sending i can changer easy !! i think i ded not get all the structure of this bundle.

xorgxx commented 8 years ago

just find one anscew : HMAC secure signature of message if change HMAC is not valide any more.

xorgxx commented 8 years ago

.....