Skip to content

Commit

Permalink
Merge pull request #3 from Attanon/master
Browse files Browse the repository at this point in the history
Feature: new GopayInline URL
  • Loading branch information
f3l1x committed Sep 25, 2015
2 parents ff7d0f5 + 84136ea commit b404ec6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/GopayConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,22 @@ public static function ws()
}
}

/**
* Nové URL webove sluzby GoPay
*
* @return string URL - wsdl
*/
public static function fullNewIntegrationURL()
{
if (self::$version == self::PROD) {
return "https://gate.gopay.cz/gw/v3";

} else {
return "https://testgw.gopay.cz/gw/v3";

}
}


/**
* URL platebni brany pro zakladni integraci
Expand Down
2 changes: 2 additions & 0 deletions tests/GopayApi/GopayConfig.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ require __DIR__ . '/../bootstrap.php';
test(function () {
GopayConfig::init(GopayConfig::PROD);
Assert::equal(GopayConfig::PROD, GopayConfig::$version);
Assert::equal('https://gate.gopay.cz/gw/v3', GopayConfig::fullNewIntegrationURL());

GopayConfig::init(GopayConfig::TEST);
Assert::equal(GopayConfig::TEST, GopayConfig::$version);
Assert::equal('https://testgw.gopay.cz/gw/v3', GopayConfig::fullNewIntegrationURL());
});

test(function () {
Expand Down

0 comments on commit b404ec6

Please sign in to comment.