Method FromPhoneNumber
FromPhoneNumber(String)
Attempts to normalise a string containing a phone number to a form that can be used as a payer id.
Declaration
public static string FromPhoneNumber(string phoneNumber)
Parameters
Type | Name | Description |
---|---|---|
System.String | phoneNumber | A string containing a phone number. |
Returns
Type | Description |
---|---|
System.String | A new string containing the normalised form of the phone number. |
Remarks
This method will remove or ignore any invalid characters in the string provided and return the rules. The result is validated via the IsPhoneNumberValidId(String) method before being returned, and if invalid an exception is thrown.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.ArgumentException | Thrown if |
OnlineEftposInvalidDataException | Thrown if the converted |