Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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