@@ -41,7 +41,7 @@ abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
4141 */
4242 public function getEndpoint (): string
4343 {
44- $ paymentType = $ this ->getPaymentType () == '3d ' ? '3d ' : 'direct ' ;
44+ $ paymentType = $ this ->getPaymentType () === '3d ' ? '3d ' : 'direct ' ;
4545
4646 return $ this ->getTestMode () ? $ this ->endpoints [$ paymentType ]["test " ] : $ this ->endpoints [$ paymentType ]["prod " ];
4747 }
@@ -140,12 +140,12 @@ public function setPaymentType(string $value = ""): AbstractRequest
140140 public function sendData ($ data )
141141 {
142142 try {
143- if ($ this ->getPaymentType () == '3d ' ) {
143+ if ($ this ->getPaymentType () === '3d ' ) {
144144 $ body = http_build_query ($ data , '' , '& ' );
145145 } else {
146146 $ document = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
147147 $ root = $ document ->createElement ('GVPSRequest ' );
148- $ xml = function ($ root , $ data ) use ($ document , &$ xml ) {
148+ $ xml = static function ($ root , $ data ) use ($ document , &$ xml ) {
149149 foreach ($ data as $ key => $ value ) {
150150 if (is_array ($ value )) {
151151 $ subs = $ document ->createElement ($ key );
@@ -377,7 +377,6 @@ protected function getSalesRequestParamsFor3d(): array
377377 $ params ['cardnumber ' ] = $ this ->getCard ()->getNumber ();
378378 $ params ['cardexpiredatemonth ' ] = $ this ->getCard ()->getExpiryMonth ();
379379 $ params ['cardexpiredateyear ' ] = $ this ->getCard ()->getExpiryYear ();
380- $ params ['cardexpiredateyear ' ] = $ this ->getCard ()->getExpiryYear ();
381380 $ params ['cardcvv2 ' ] = $ this ->getCard ()->getCvv ();
382381 $ params ['secure3dsecuritylevel ' ] = '3D ' ;
383382
0 commit comments