Skip to content

Commit bf3cb3c

Browse files
committed
added gcash in index.php
1 parent 06bc618 commit bf3cb3c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

WebService/index.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use Model\ModelFactory as Factory;
1717
use Model\MLhuillierModel as MLhuillier;
18+
use Model\GCashModel as GCash;
1819

1920

2021
// define('BASEPATH', 'DEXInterface');
@@ -45,7 +46,11 @@ public function __construct(array $postParam)
4546
if ($postParam['model'] == "MLhuillier") {
4647
$factory = new Factory(new MLhuillier($_POST));
4748
$this->_return = $factory->returnData();
48-
}
49+
}
50+
if ($postParam['model'] == "GCash") {
51+
$factory = new Factory(new GCash($_POST));
52+
$this->_return = $factory->returnData();
53+
}
4954
}
5055

5156
/**
@@ -81,9 +86,8 @@ static function _checkRemoteAddress()
8186

8287
$return = "500 Error! Please try again!";
8388

84-
if ($_SERVER['REQUEST_METHOD'] == "POST" && DEXInterface::_checkRemoteAddress() == true && $_POST['model'] != ' ')
85-
{
86-
$indexObj = new DEXInterface($_POST );
89+
if ($_SERVER['REQUEST_METHOD'] == "POST" && DEXInterface::_checkRemoteAddress() == true && $_POST['model'] != ' ') {
90+
$indexObj = new DEXInterface($_POST );
8791
$return = $indexObj->getReturn();
8892
}
8993
else {

0 commit comments

Comments
 (0)