-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add branding by client country (#20)
## [3.8.0 (2022-07-05)](3.7.6...3.8.0) ### Added - Add branding by client country (it's defined in PS). - Add modifiers support: UY. ### Removed - Remove currency validation, now it depends from response of WC. - Remove payments methods enable, now it depends from configurations in WC. - Remove connection type configuration, only supports REST messages (using JSON).
- Loading branch information
1 parent
45e4cfa
commit ab273c1
Showing
29 changed files
with
516 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace PlacetoPay\Constants; | ||
|
||
interface Client | ||
{ | ||
public const GNT = 'Trgarg'; | ||
public const GOU = 'TBH'; | ||
public const PTP = 'CynprgbCnl'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace PlacetoPay\Constants; | ||
|
||
interface Discount | ||
{ | ||
public const UY_IVA_REFUND = '17934'; | ||
|
||
public const UY_IMESI_REFUND = '18083'; | ||
|
||
public const UY_FINANCIAL_INCLUSION = '19210'; | ||
|
||
public const UY_AFAM_REFUND = '18910'; | ||
|
||
public const UY_TAX_REFUND = '18999'; | ||
|
||
public const UY_NONE = '0'; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace PlacetoPay\Countries; | ||
|
||
use PlacetoPay\Constants\Client; | ||
use PlacetoPay\Constants\CountryCode; | ||
use PlacetoPay\Constants\Environment; | ||
|
||
class ColombiaCountryConfig extends CountryConfig | ||
{ | ||
public static function resolve(string $countryCode): bool | ||
{ | ||
return CountryCode::COLOMBIA === $countryCode; | ||
} | ||
|
||
public static function getEndpoints(string $client): array | ||
{ | ||
if ($client === unmaskString(Client::GOU)) { | ||
return array_merge(parent::getEndpoints($client), [ | ||
Environment::PRODUCTION => unmaskString('uggcf://purpxbhg.tbhcntbf.pbz.pb'), | ||
Environment::TEST => unmaskString('uggcf://purpxbhg.grfg.tbhcntbf.pbz.pb'), | ||
]); | ||
} | ||
|
||
return parent::getEndpoints($client); | ||
} | ||
|
||
public static function getClient(): array | ||
{ | ||
return [ | ||
unmaskString(Client::PTP) => unmaskString(Client::PTP), | ||
unmaskString(Client::GOU) => unmaskString(Client::GOU), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.