The Accounts webservice is used for managing all the user identities within the system. It provides access to the functionality needed for managing accounts, from login, log off, reset password and more.
The login function is used for login into the app – besides the ability to send the user name password combo, it enables more info to be sent during login, for a more secure login (like – app token, device id etc.)
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
No | string | “6224A847-4867-41EE-851D-36CC8BA1B” | ||
username | No | string | ||
Password | No | string | ||
Options | ||||
Account.LoginOptions | Array | |||
userrole | Yes | string | ||
appName | No | string | ||
applicationToken | No | string | ||
deviceId | No | string | ||
pushToken | No | string | ||
setCookie | No | boolean |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/Account.svc/login"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("applicationToken", "54f914fb-6017-48a3-93cc-37c383363bdf"); request.AddHeader("Content-Type", "application/json; charset=UTF-8"); request.AddParameter("application/json; charset=UTF-8", "{rn "email":"email@address.com",rn "userName":"SeanN",rn "password":"password",rn "options": {rntttt"applicationToken":"54f914fb-6017-48a3-93cc-37c383363bdf",rntttt"userRole":"15"rnttttrn}rn}rn", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/Account.svc/login", "method": "POST", "timeout": 0, "headers": { "applicationToken": "54f914fb-6017-48a3-93cc-37c383363bdf", "Content-Type": "application/json; charset=UTF-8" }, "data": "{rn "email":"email@address.com",rn "userName":"SeanN",rn "password":"password",rn "options": {rntttt"applicationToken":"54f914fb-6017-48a3-93cc-37c383363bdf",rntttt"userRole":"15"rnttttrn}rn}rn", }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://webservices.gr8pay.com/v2/Account.svc/login", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "email":"email@address.com",rn "userName":"SeanN",rn "password":"password",rn "options": {rntttt"applicationToken":"54f914fb-6017-48a3-93cc-37c383363bdf",rntttt"userRole":"15"rnttttrn}rn}rn", CURLOPT_HTTPHEADER => array( "applicationToken: 54f914fb-6017-48a3-93cc-37c383363bdf", "Content-Type: application/json; charset=UTF-8" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
When using the login service to login, the service will return an Encodedcookie – in using the cookie and the token, you will be able to create an auto login function, so that users don’t need to login every time they enter the app .
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
applicationToken | No | string | “6224A847-4867-41EE-851D-36CC8BA1B” | |
Cookie | No | string |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/DecodeLoginCookie"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("ker-ching_co_za_Token", "efb0f54a-a8e8-4f5c-a843-71dcf4f17fa8"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{rn "applicationToken": "54f914fb-6017-48a3-93cc-37c383363bdf",rn "cookie": "CustomerNumber=2014056&Email=email%40address.com&Signature=gXHd26EEryaHT7dtDSMkEkFwDkSWjb9j1HGvN2jVghM="rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/DecodeLoginCookie", "method": "POST", "timeout": 0, "headers": { "ker-ching_co_za_Token": "efb0f54a-a8e8-4f5c-a843-71dcf4f17fa8", "Content-Type": "application/json" }, "data": JSON.stringify({"applicationToken":"54f914fb-6017-48a3-93cc-37c383363bdf","cookie":"CustomerNumber=2014056&Email=email%40address.com&Signature=gXHd26EEryaHT7dtDSMkEkFwDkSWjb9j1HGvN2jVghM="}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/DecodeLoginCookie", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "applicationToken": "54f914fb-6017-48a3-93cc-37c383363bdf",rn "cookie": "CustomerNumber=2014056&Email=email%40address.com&Signature=gXHd26EEryaHT7dtDSMkEkFwDkSWjb9j1HGvN2jVghM="rn}", CURLOPT_HTTPHEADER => array( "ker-ching_co_za_Token: efb0f54a-a8e8-4f5c-a843-71dcf4f17fa8", "Content-Type: application/json" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
With the activation code and the device ID you can use this method to activate the device. Access to the device can be revoked if needs be, through the admin panel.
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
deviceId | No | string | “6224A847-4867-41EE-851D-36CC8BA1B” | |
activationCode | No | string |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/DeviceActivate"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{rn "deviceId": "string",rn "activationCode": "string"rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/DeviceActivate", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": JSON.stringify({"deviceId":"string","activationCode":"string"}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/DeviceActivate", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "deviceId": "string",rn "activationCode": "string"rn}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
When a device is registered to the system, an activation process can be added to utilize the service to send the original registered device ID. The service will then return an activation code – which, will be sent via SMS to the user’s phone number as listed on registration.
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
deviceId | No | string | “6224A847-4867-41EE-851D-36CC8BA1B” |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/DeviceSendActivationCode"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{rn "deviceId": "string"rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/DeviceSendActivationCode", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": JSON.stringify({"deviceId":"string"}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/DeviceSendActivationCode", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "deviceId": "string"rn}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
The service will log the user out of the app.
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
“6224A847-4867-41EE-851D-36CC8BA1B” |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/LogOff"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/LogOff", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/LogOff", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
Register device service gives you the ability to register the user’s device and then to limit the user’s connectivity when needed.
You will be able to control the devices from the Devices tab under merchants/wallet
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
deviceId | No | string | “6224A847-4867-41EE-851D-36CC8BA1B” | |
phoneNumber | No | string |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/RegisterDevice"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{rn "deviceId": "string",rn "phoneNumber": "string"rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/RegisterDevice", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": JSON.stringify({"deviceId":"string","phoneNumber":"string"}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/RegisterDevice", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "deviceId": "string",rn "phoneNumber": "string"rn}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
From time to time, users forget passwords. The service will reset the password to a temporary password and will generate an email to the user’s email address with instructions on how to change the password.
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
No | string | “6224A847-4867-41EE-851D-36CC8BA1B” |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/ResetPassword"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{rn "email": "string"rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/ResetPassword", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": JSON.stringify({"email":"string"}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/ResetPassword", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "email": "string"rn}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
The login function is used for login into the app – besides the ability to send the user name password combo, it enables more info to be sent during login, for a more secure login (like – app token, device id etc.)
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
oldPassword | No | string | “6224A847-4867-41EE-851D-36CC8BA1B” | |
newPassword | No | string |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/UpdatePassword"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{rn "oldPassword": "string",rn "newPassword": "string"rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/UpdatePassword", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": JSON.stringify({"oldPassword":"string","newPassword":"string"}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/UpdatePassword", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "oldPassword": "string",rn "newPassword": "string"rn}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
Using the old password, the user can change an existing password to a new one, as long as it complies with the password rules.
With the user’s password, the user can change the pin.
FieldName | Mandatory? | Field Type | Description | Sample |
---|---|---|---|---|
Password | No | String | “6224A847-4867-41EE-851D-36CC8BA1B” | |
newPincode | No | String |
Field Name | Field Type | Description |
---|---|---|
Code | Integer | |
IsSuccess | Boolean | |
Key | String | |
Message | String | See Return Codes Table* |
Number | String |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/account.svc/UpdatePincode"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{rn "password": "string",rn "newPincode": "string"rn}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/account.svc/UpdatePincode", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": JSON.stringify({"password":"string","newPincode":"string"}), }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/account.svc/UpdatePincode", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{rn "password": "string",rn "newPincode": "string"rn}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |