Address.php
5 years ago
Company.php
5 years ago
Internet.php
5 years ago
Payment.php
5 years ago
Person.php
5 years ago
PhoneNumber.php
5 years ago
Text.php
5 years ago
Payment.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\nl_BE; |
| 4 | |
| 5 | class Payment extends \Faker\Provider\Payment |
| 6 | { |
| 7 | /** |
| 8 | * International Bank Account Number (IBAN) |
| 9 | * @link http://en.wikipedia.org/wiki/International_Bank_Account_Number |
| 10 | * @param string $prefix for generating bank account number of a specific bank |
| 11 | * @param string $countryCode ISO 3166-1 alpha-2 country code |
| 12 | * @param integer $length total length without country code and 2 check digits |
| 13 | * @return string |
| 14 | */ |
| 15 | public static function bankAccountNumber($prefix = '', $countryCode = 'BE', $length = null) |
| 16 | { |
| 17 | return static::iban($countryCode, $prefix, $length); |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Value Added Tax (VAT) |
| 22 | * |
| 23 | * @example 'BE0123456789', ('spaced') 'BE 0123456789' |
| 24 | * |
| 25 | * @see http://ec.europa.eu/taxation_customs/vies/faq.html?locale=en#item_11 |
| 26 | * @see http://www.iecomputersystems.com/ordering/eu_vat_numbers.htm |
| 27 | * @see http://en.wikipedia.org/wiki/VAT_identification_number |
| 28 | * |
| 29 | * @param bool $spacedNationalPrefix |
| 30 | * |
| 31 | * @return string VAT Number |
| 32 | */ |
| 33 | public static function vat($spacedNationalPrefix = true) |
| 34 | { |
| 35 | $prefix = $spacedNationalPrefix ? "BE " : "BE"; |
| 36 | |
| 37 | return sprintf("%s0%d", $prefix, self::randomNumber(9, true)); |
| 38 | } |
| 39 | } |
| 40 |