Exemple #1
0
 /**
  * @inheritdoc
  */
 public function getValues()
 {
     $values = ['TYPE' => '00001', 'MONTANT' => $this->amount->getAmount()->unscaledValue(), 'DEVISE' => $this->amount->getCurrency()->getNumericCode(), 'REFERENCE' => $this->reference, 'PORTEUR' => $this->card->getNumber(), 'DATEVAL' => $this->card->getValidity(), 'CVV' => $this->card->getCvv()];
     if ($this->id3d !== null) {
         $values['ID3D'] = $this->id3d;
     }
     return $values;
 }
Exemple #2
0
 /**
  * Returns an array of POST parameters to use to redirect the customer to the 3D Secure authentication page.
  *
  * These parameters can be used to build a web form to post in the user's browser.
  *
  * @param Card  $card       The payment card.
  * @param Money $amount     The amount of the transaction.
  * @param string $sessionId A unique session ID of up to 250 chars.
  *                          This session ID will be returned in the callback,
  *                          and used to identify this 3D Secure authentication.
  *
  * @return array
  */
 public function getPostParameters(Card $card, Money $amount, $sessionId)
 {
     $parameters = ['Amount' => $amount->getAmount()->unscaledValue(), 'Currency' => $amount->getCurrency()->getNumericCode(), 'CCNumber' => $card->getNumber(), 'CCExpDate' => $card->getValidity(), 'CVVCode' => $card->getCvv(), 'IdMerchant' => $this->paybox->getIdentifier(), 'IdSession' => $sessionId];
     if ($this->callbackUrl !== null) {
         $parameters['URLHttpDirect'] = $this->callbackUrl;
     }
     if ($this->returnUrl !== null) {
         $parameters['URLRetour'] = $this->returnUrl;
     }
     return $parameters;
 }
 /**
  * @inheritdoc
  */
 public function getValues()
 {
     return ['TYPE' => '00012', 'MONTANT' => $this->amount->getAmount()->unscaledValue(), 'DEVISE' => $this->amount->getCurrency()->getNumericCode(), 'REFERENCE' => $this->reference, 'PORTEUR' => $this->card->getNumber(), 'DATEVAL' => $this->card->getValidity(), 'CVV' => $this->card->getCvv()];
 }