diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 0b994e4c97..bfaa8b1bdb 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -425,6 +425,10 @@ * * @method string creditCardNumber($type = null, $formatted = false, $separator = '-') * + * @property string $debitCardNumber + * + * @method string debitCardNumber($type = null, $formatted = false, $separator = '-') + * * @property \DateTime $creditCardExpirationDate * * @method \DateTime creditCardExpirationDate($valid = true) diff --git a/src/Faker/Provider/fa_IR/Payment.php b/src/Faker/Provider/fa_IR/Payment.php new file mode 100644 index 0000000000..4f3cbfb251 --- /dev/null +++ b/src/Faker/Provider/fa_IR/Payment.php @@ -0,0 +1,71 @@ + [ + '603799##########', + ], + 'Mellat' => [ + '610433##########', + ], + 'Sepah' => [ + '589210##########', + ], + 'Saderat' => [ + '627648##########', + '207177##########', + ], + 'Keshavarzi' => [ + '603770##########', + '639217##########', + ], + 'Maskan' => [ + '628023##########', + ], + 'Parsian' => [ + '622108##########', + '639194##########', + '627884##########', + ], + 'Saman' => [ + '621986##########', + ], + 'Sina' => [ + '639346##########', + ], + 'Shahr' => [ + '502806##########', + '504806##########', + ], + 'Tejarat' => [ + '627353##########', + ], + ]; + + /** + * Returns the String of an Iranian card number. + * + * @param string $type Supporting any of 'Melli', 'Mellat', 'Sepah', 'Saderat', 'Keshavarzi', + * 'Maskan', 'Parsian', 'Saman', 'Sina', 'Shahr' and 'Tejarat', + * @param bool $formatted Set to true if the output string should contain one separator every 4 digits + * @param string $separator Separator string for formatting card number. Defaults to dash (-). + * + * @return string + * + * @example '6104337526776537' + */ + public static function debitCardNumber($type = null, $formatted = false, $separator = '-') + { + return static::creditCardNumber($type, $formatted, $separator); + } +}