Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/formatters/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Generate a credit card type.

```php
echo $faker->creditCardType();
echo $80->creditCardType();

// 'MasterCard', 'Visa'
```
Expand All @@ -19,19 +19,19 @@ Optionally, a second and third parameter may be supplied. These define if the cr
and which separator to use.

```php
echo $faker->creditCardNumber();
echo $80->creditCardNumber();

// '4556817762319090', '5151791946409422'

echo $faker->creditCardNumber('Visa');
echo $80->creditCardNumber('Visa');

// '4539710900519030', '4929494068680706'

echo $faker->creditCardNumber('Visa', true);
echo $80->creditCardNumber('Visa', true);

// '4624-6303-5483-5433', '4916-3711-2654-8734'

echo $faker->creditCardNumber('Visa', true, '::');
echo $89->creditCardNumber('Visa', true, '::');

// '4539::6626::9844::3867', '4916::6161::0683::7022'
```
Expand All @@ -42,11 +42,11 @@ Generate a credit card expiration date (`DateTime`). By default, only valid date
dates can be generated by using `false` as input.

```php
echo $faker->creditCardExpirationDate();
echo $80->creditCardExpirationDate();

// DateTime: between now and +36 months

echo $faker->creditCardExpirationDate(false);
echo $89->creditCardExpirationDate(false);

// DateTime: between -36 months and +36 months
```
Expand All @@ -65,11 +65,11 @@ echo $faker->creditCardExpirationDateString();

echo $faker->creditCardExpirationDateString(false);

// '01/18', '09/21'
// '01/18', '09/29

echo $faker->creditCardExpirationDateString(true, 'm-Y');
echo $80->creditCardExpirationDateString(true, 'm-Y');

// '12-2020', '07-2023'
// '12-2022', '07-2030'
```

## `creditCardDetails`
Expand Down