src/Domain/Charge.php 1 location
|
@@ 85-89 (lines=5) @@
|
| 82 |
|
*/ |
| 83 |
|
public function getCreateData($countryCode = Country::TH) |
| 84 |
|
{ |
| 85 |
|
if (!in_array($this->currency, Currency::getSupporteds($countryCode))) { |
| 86 |
|
throw new InvalidRequestArgumentException( |
| 87 |
|
sprintf('The currency `%s` is not supported in your country `%s`.', $this->currency, $countryCode) |
| 88 |
|
); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
return [ |
| 92 |
|
'customer' => (string)($this->customer), |
src/Domain/Source.php 1 location
|
@@ 40-44 (lines=5) @@
|
| 37 |
|
*/ |
| 38 |
|
public function getCreateData($countryCode = Country::TH) |
| 39 |
|
{ |
| 40 |
|
if (!in_array($this->currency, Currency::getSupporteds($countryCode))) { |
| 41 |
|
throw new InvalidRequestArgumentException( |
| 42 |
|
sprintf('The currency `%s` is not supported in your country `%s`.', $this->currency, $countryCode) |
| 43 |
|
); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
return [ |
| 47 |
|
'amount' => $this->amount * Currency::getDivisionOffset($this->currency), |