<?php
namespace Faker\Provider\en_SG;
use Faker\Provider\DateTime;
class Person extends \Faker\Provider\Person
{
/**
* National Registration Identity Card number
*
* @param \DateTime|null $birthDate birth date
*
* @return string in format S1234567D or T1234567J
*/
public static function nric(?\DateTime $birthDate = null): string
{
return self::singaporeId($birthDate, false);
}
/**
* Foreign Identification Number
*
* @param \DateTime|null $issueDate issue date
*
* @return string in format F1234567N or G1234567X
*/
public static function fin(?\DateTime $issueDate = null): string
{
return self::singaporeId($issueDate, true);
}
/**
* Singapore NRIC (citizens) or FIN (foreigners) number
*
* @param \DateTime|null $issueDate birth/issue date
* @param bool $foreigner whether a person is foreigner or citizen
*
* @return string in format S1234567D, T1234567J, F1234567N or G1234567X
*/
public static function singaporeId(?\DateTime $issueDate = null, bool $foreigner = false): string
{
if ($issueDate === null) {
$issueDate = DateTime::dateTimeThisCentury();
}
$weights = [2, 7, 6, 5, 4, 3, 2];
$result = '';
if ($foreigner) {
$prefix = ($issueDate < new \DateTime('2000-01-01')) ? 'F' : 'G';
$checksumArr = ['X', 'W', 'U', 'T', 'R', 'Q', 'P', 'N', 'M', 'L', 'K'];
} else {
$prefix = ($issueDate < new \DateTime('2000-01-01')) ? 'S' : 'T';
// NRICs before 1968 did not contain YOB
$result .= ($issueDate < new \DateTime('1968-01-01')) ? static::randomElement(['00', '01']) : $issueDate->format('y');
$checksumArr = ['J', 'Z', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A'];
}
$length = count($weights);
for ($i = strlen($result); $i < $length; ++$i) {
$result .= static::randomDigit();
}
$checksum = in_array($prefix, ['G', 'T'], true) ? 4 : 0;
for ($i = 0; $i < $length; ++$i) {
$checksum += (int) $result[$i] * $weights[$i];
}
return $prefix . $result . $checksumArr[$checksum % 11];
}
}
At NFC Pay, your privacy is of utmost importance to us. This Privacy Policy outlines how we collect, use, share, and protect your personal information when you use our services, including our website and mobile applications.
1. Information We Collect
2. How We Use Your Information
We use the information we collect for the following purposes:
3. Sharing Your Information
We may share your personal information in the following circumstances:
4. Security of Your Information
We take the security of your personal information seriously and implement a variety of security measures, including encryption, secure servers, and access controls, to protect your data from unauthorized access, disclosure, alteration, or destruction. However, no method of transmission over the internet or electronic storage is completely secure, and we cannot guarantee its absolute security.
5. Your Privacy Rights
Depending on your location, you may have certain rights regarding your personal information, such as:
6. Third-Party Links
Our services may contain links to third-party websites or services. We are not responsible for the privacy practices or the content of these third-party sites. We encourage you to review the privacy policies of those third parties.
7. Children’s Privacy
Our services are not intended for individuals under the age of 13. We do not knowingly collect personal information from children under 13. If we become aware that we have collected personal information from a child under 13, we will take steps to delete that information.
8. Changes to This Privacy Policy
We may update this Privacy Policy from time to time to reflect changes in our practices or for other operational, legal, or regulatory reasons. We will notify you of any significant changes by posting the new Privacy Policy on our website and updating the effective date.
9. Contact Us
If you have any questions or concerns about this Privacy Policy or our data practices, please contact us at:
Email: support@nfcpay.com