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