You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Hacked IterableAPICollection for subaccounts. I really need the class to handle this, it's violating DRY
* TDD, a lot of failing tests here
* Big chunk of TDD and implementation, almost done.
* Docs, factory implementation
* Update src/Subaccount/Filter/Subaccount.php
Co-authored-by: Chris Tankersley <chris@ctankersley.com>
* Update test/Subaccount/ClientTest.php
Co-authored-by: Chris Tankersley <chris@ctankersley.com>
* Refactor hydrators to use the stock one
* Typo in client factory
* Namespace change
* more explicit class name
* DTO object passed into update
* Add secret to DTO
* refactor out array payload
* split out transfer requests
---------
Co-authored-by: Chris Tankersley <chris@ctankersley.com>
In the same way, checking a verification requires the PIN the user provided, and the request ID:
276
276
@@ -284,7 +284,7 @@ try {
284
284
}
285
285
```
286
286
287
-
### Searching For a Verification
287
+
####Searching For a Verification
288
288
289
289
You can check the status of a verification, or access the results of past verifications using a request ID.
290
290
The verification object will then provide a rich interface:
@@ -298,7 +298,7 @@ foreach($verification->getChecks() as $check){
298
298
}
299
299
```
300
300
301
-
### Payment Verification
301
+
####Payment Verification
302
302
303
303
Vonage's [Verify API][doc_verify] has SCA (Secure Customer Authentication) support, required by the PSD2 (Payment Services Directive) and used by applications that need to get confirmation from customers for payments. It includes the payee and the amount in the message.
304
304
@@ -312,9 +312,9 @@ echo "Started verification with an id of: " . $response['request_id'];
312
312
313
313
Once the user inputs the pin code they received, call the `/check` endpoint with the request ID and the pin to confirm the pin is correct.
314
314
315
-
## Verify Examples (v2)
315
+
###Verify Examples (v2)
316
316
317
-
### Starting a Verification
317
+
####Starting a Verification
318
318
319
319
Vonage's Verify v2 relies more on asynchronous workflows via. webhooks, and more customisable Verification
320
320
workflows to the developer. To start a verification, you'll need the API client, which is under the namespace
@@ -363,7 +363,7 @@ The base request types are as follows:
363
363
For adding workflows, you can see the available valid workflows as constants within the `VerificationWorkflow` object.
364
364
For a better developer experience, you can't create an invalid workflow due to the validation that happens on the object.
365
365
366
-
### Check a submitted code
366
+
####Check a submitted code
367
367
368
368
To submit a code, you'll need to surround the method in a try/catch due to the nature of the API. If the code is correct,
369
369
the method will return a `true` boolean. If it fails, it will throw the relevant Exception from the API that will need to
@@ -378,7 +378,7 @@ try {
378
378
}
379
379
```
380
380
381
-
### Webhooks
381
+
####Webhooks
382
382
383
383
As events happen during a verification workflow, events and updates will fired as webhooks. Incoming server requests that conform to
384
384
PSR-7 standards can be hydrated into a webhook value object for nicer interactions. You can also hydrate
All `$client->voice()` methods require the client to be constructed with a `Vonage\Client\Credentials\Keypair`, or a
413
413
`Vonage\Client\Credentials\Container` that includes the `Keypair` credentials:
@@ -907,28 +907,166 @@ try {
907
907
908
908
Check out the [documentation](https://developer.nexmo.com/number-insight/code-snippets/number-insight-advanced-async-callback) for what to expect in the incoming webhook containing the data you requested.
909
909
910
+
### Subaccount Examples
911
+
912
+
This API is used to create and configure subaccounts related to your primary account and transfer credit, balances and bought numbers between accounts.
913
+
The subaccounts API is disabled by default. If you want to use subaccounts, [contact support](https://api.support.vonage.com) to have the API enabled on your account.
914
+
915
+
#### Get a list of Subaccounts
916
+
917
+
```php
918
+
$client = new \Vonage\Client(new \Vonage\Client\Credentials\Basic(API_KEY, API_SECRET));
0 commit comments