Skip to content

Commit 03e71de

Browse files
author
Olga Zdančuka
committed
Some fixes for VerifyEnrollmentDataBuilder and IP for generation for B2P
1 parent 4da2629 commit 03e71de

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

lib/TransactPRO/Gate/Builders/InitB2PDataBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function build()
1515
return array(
1616
'rs' => $this->getField('rs'),
1717
'merchant_transaction_id' => $this->getField('merchant_transaction_id'),
18-
'user_ip' => $this->getField('user_ip', $_SERVER['REMOTE_ADDR']),
18+
'user_ip' => $this->getField('user_ip', $this->getRemoteAddress()),
1919
'description' => $this->getField('description'),
2020
'amount' => $this->getField('amount'),
2121
'currency' => $this->getField('currency'),
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
namespace TransactPRO\Gate\Builders;
3+
4+
class VerifyEnrollmentDataBuilder extends Builder
5+
{
6+
public function build()
7+
{
8+
return array(
9+
'cc' => $this->getField('cc'),
10+
'mid' => $this->getField('mid'),
11+
'currency' => $this->getField('currency'),
12+
);
13+
}
14+
15+
protected function checkData()
16+
{
17+
$this->checkMandatoryField('cc');
18+
$this->checkMandatoryField('mid');
19+
$this->checkMandatoryField('currency');
20+
}
21+
}

0 commit comments

Comments
 (0)