Skip to content

Commit

Permalink
Some fixes for VerifyEnrollmentDataBuilder and IP for generation for B2P
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Zdančuka committed Jul 20, 2018
1 parent 4da2629 commit 03e71de
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/TransactPRO/Gate/Builders/InitB2PDataBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function build()
return array(
'rs' => $this->getField('rs'),
'merchant_transaction_id' => $this->getField('merchant_transaction_id'),
'user_ip' => $this->getField('user_ip', $_SERVER['REMOTE_ADDR']),
'user_ip' => $this->getField('user_ip', $this->getRemoteAddress()),
'description' => $this->getField('description'),
'amount' => $this->getField('amount'),
'currency' => $this->getField('currency'),
Expand Down
21 changes: 21 additions & 0 deletions lib/TransactPRO/Gate/Builders/VerifyEnrollmentDataBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
namespace TransactPRO\Gate\Builders;

class VerifyEnrollmentDataBuilder extends Builder
{
public function build()
{
return array(
'cc' => $this->getField('cc'),
'mid' => $this->getField('mid'),
'currency' => $this->getField('currency'),
);
}

protected function checkData()
{
$this->checkMandatoryField('cc');
$this->checkMandatoryField('mid');
$this->checkMandatoryField('currency');
}
}

0 comments on commit 03e71de

Please sign in to comment.