From 44b33d99f3cc4102fee56be781ce6e202b5a4a20 Mon Sep 17 00:00:00 2001 From: Jim Seconde Date: Fri, 17 Jan 2025 13:47:29 +0000 Subject: [PATCH 1/2] change verify snippets to new variables --- verify/cancel.php | 8 ++--- verify/request.php | 2 +- verify/request_with_workflow.php | 26 ++++++++-------- verify/search.php | 14 ++++----- verify/send_psd2_request.php | 2 +- verify/send_psd2_request_with_workflow.php | 30 +++++++++---------- verify/trigger_next_event.php | 6 ++-- verify/verify.php | 12 ++++---- verify2/cancel-request.php | 4 +-- verify2/check-verification-code.php | 2 +- verify2/create-template-fragment.php | 2 +- verify2/delete-fragment.php | 2 +- verify2/delete-template.php | 2 +- verify2/get-fragment.php | 2 +- verify2/get-template.php | 2 +- verify2/list-fragments.php | 2 +- verify2/list-templates.php | 2 +- verify2/send-request-email.php | 2 +- verify2/send-request-silent-auth.php | 2 +- verify2/send-request-sms.php | 2 +- verify2/send-request-voice.php | 2 +- verify2/send-request-whatsapp-interactive.php | 2 +- verify2/send-request-whatsapp.php | 2 +- verify2/send-request-with-fallback.php | 4 +-- verify2/update-template-fragment.php | 4 +-- verify2/update-template.php | 2 +- 26 files changed, 71 insertions(+), 71 deletions(-) diff --git a/verify/cancel.php b/verify/cancel.php index 7fbf57a..e8e86ca 100644 --- a/verify/cancel.php +++ b/verify/cancel.php @@ -4,18 +4,18 @@ require_once __DIR__ . '/../vendor/autoload.php'; // Support direct execution from command line or via a GET request as a web server -if (!defined('REQUEST_ID')) { - define('REQUEST_ID', isset($argv[1])? $argv[1]: $_GET['request_id']); +if (!defined('VERIFY_REQUEST_ID')) { + define('VERIFY_REQUEST_ID', isset($argv[1])? $argv[1]: $_GET['request_id']); } -error_log('Cancelling `request_id` ' . REQUEST_ID); +error_log('Cancelling `request_id` ' . VERIFY_REQUEST_ID); $basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); $client = new \Vonage\Client(new \Vonage\Client\Credentials\Container($basic)); try { - $result = $client->verify()->cancel(REQUEST_ID); + $result = $client->verify()->cancel(VERIFY_REQUEST_ID); var_dump($result->getResponseData()); } diff --git a/verify/request.php b/verify/request.php index e710b8a..4993dd1 100644 --- a/verify/request.php +++ b/verify/request.php @@ -6,7 +6,7 @@ $basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); $client = new \Vonage\Client(new \Vonage\Client\Credentials\Container($basic)); -$request = new \Vonage\Verify\Request(NUMBER, BRAND_NAME); +$request = new \Vonage\Verify\Request(VERIFY_NUMBER, VERIFY_BRAND_NAME); // choose PIN length (4 or 6) $request->setCodeLength(4); diff --git a/verify/request_with_workflow.php b/verify/request_with_workflow.php index eba2032..e69bb6c 100644 --- a/verify/request_with_workflow.php +++ b/verify/request_with_workflow.php @@ -10,11 +10,11 @@ Sends a verification request and allows setting a Workflow ID Usage: - php request_with_workflow.php -n [-b ] [-w ] + php request_with_workflow.php -n [-b ] [-w ] - NUMBER the telephone number to send the Verify request to - BRAND_NAME is the name of the company sending the request. Defaults to 'Acme, Inc.' - WORKFLOW_ID is the workflow ID to use. Must be between 1-5 + VERIFY_NUMBER the telephone number to send the Verify request to + VERIFY_BRAND_NAME is the name of the company sending the request. Defaults to 'Acme, Inc.' + VERIFY_WORKFLOW_ID is the workflow ID to use. Must be between 1-5 Options can also be passed as environment variables. @@ -25,20 +25,20 @@ exit(1); } -if (!defined('NUMBER')) { - define('NUMBER', (array_key_exists('n', $options)) ? $options['n'] : null); +if (!defined('VERIFY_NUMBER')) { + define('VERIFY_NUMBER', (array_key_exists('n', $options)) ? $options['n'] : null); } -if (!defined('BRAND_NAME')) { - define('BRAND_NAME', (array_key_exists('b', $options)) ? $options['b'] : 'Acme, Inc'); +if (!defined('VERIFY_BRAND_NAME')) { + define('VERIFY_BRAND_NAME', (array_key_exists('b', $options)) ? $options['b'] : 'Acme, Inc'); } -if (!defined('WORKFLOW_ID')) { - define('WORKFLOW_ID', (array_key_exists('w', $options)) ? $options['w'] : 4); +if (!defined('VERIFY_WORKFLOW_ID')) { + define('VERIFY_WORKFLOW_ID', (array_key_exists('w', $options)) ? $options['w'] : 4); } -if (is_null(NUMBER)) { - echo "Please supply a NUMBER to send a verification request to." +if (is_null(VERIFY_NUMBER)) { + echo "Please supply a VERIFY_NUMBER to send a verification request to." . PHP_EOL . PHP_EOL . $helpText @@ -46,7 +46,7 @@ exit(1); } -$request = new \Vonage\Verify\Request(NUMBER, BRAND_NAME, (int) WORKFLOW_ID); +$request = new \Vonage\Verify\Request(VERIFY_NUMBER, VERIFY_BRAND_NAME, (int) VERIFY_WORKFLOW_ID); $response = $client->verify()->start($request); echo "Started verification, `request_id` is " . $response->getRequestId(); diff --git a/verify/search.php b/verify/search.php index a8afea1..d762803 100644 --- a/verify/search.php +++ b/verify/search.php @@ -10,9 +10,9 @@ Searches for a verify request Usage: - php search.php + php search.php - REQUEST_ID is the ID of a verification event + VERIFY_REQUEST_ID is the ID of a verification event ENDHELP; @@ -21,12 +21,12 @@ exit(1); } -if (!defined('REQUEST_ID')) { - define('REQUEST_ID', (array_key_exists(1, $argv)) ? $argv[1] : null); +if (!defined('VERIFY_REQUEST_ID')) { + define('VERIFY_REQUEST_ID', (array_key_exists(1, $argv)) ? $argv[1] : null); } -if (is_null(REQUEST_ID)) { - echo "Please supply a REQUEST_ID to search for." +if (is_null(VERIFY_REQUEST_ID)) { + echo "Please supply a VERIFY_REQUEST_ID to search for." . PHP_EOL . PHP_EOL . $helpText @@ -35,7 +35,7 @@ } try { - $result = $client->verify()->search(REQUEST_ID); + $result = $client->verify()->search(VERIFY_REQUEST_ID); echo "Request has a status of " . $result->getStatus() . PHP_EOL; } catch (\Vonage\Client\Exception\Request $e) { error_log("Client error: " . $e->getMessage()); diff --git a/verify/send_psd2_request.php b/verify/send_psd2_request.php index d02f4c5..ec12356 100644 --- a/verify/send_psd2_request.php +++ b/verify/send_psd2_request.php @@ -6,7 +6,7 @@ $basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); $client = new \Vonage\Client(new \Vonage\Client\Credentials\Container($basic)); -$request = new \Vonage\Verify\RequestPSD2(RECIPIENT_NUMBER, PAYEE_NAME, AMOUNT); +$request = new \Vonage\Verify\RequestPSD2(VERIFY_NUMBER, VERIFY_PAYEE_NAME, VERIFY_AMOUNT); $response = $client->verify()->requestPSD2($request); echo "Started verification, `request_id` is " . $response['request_id']; diff --git a/verify/send_psd2_request_with_workflow.php b/verify/send_psd2_request_with_workflow.php index 3aa3dfd..c59d3fa 100644 --- a/verify/send_psd2_request_with_workflow.php +++ b/verify/send_psd2_request_with_workflow.php @@ -10,11 +10,11 @@ Sends a verification request and allows setting a Workflow ID Usage: - php request_with_workflow.php -n [-b ] [-w ] + php request_with_workflow.php -n [-b ] [-w ] - NUMBER the telephone number to send the Verify request to - BRAND_NAME is the name of the company sending the request. Defaults to 'Acme, Inc.' - WORKFLOW_ID is the workflow ID to use. Must be between 1-5 + VERIFY_NUMBER the telephone number to send the Verify request to + VERIFY_BRAND_NAME is the name of the company sending the request. Defaults to 'Acme, Inc.' + VERIFY_WORKFLOW_ID is the workflow ID to use. Must be between 1-5 Options can also be passed as environment variables. @@ -25,31 +25,31 @@ exit(1); } -if (!defined('RECIPIENT_NUMBER')) { - define('RECIPIENT_NUMBER', (array_key_exists('n', $options)) ? $options['n'] : null); +if (!defined('VERIFY_NUMBER')) { + define('VERIFY_NUMBER', (array_key_exists('n', $options)) ? $options['n'] : null); } -if (!defined('PAYEE_NAME')) { - define('PAYEE_NAME', (array_key_exists('b', $options)) ? $options['b'] : 'Acme, Inc'); +if (!defined('VERIFY_PAYEE_NAME')) { + define('VERIFY_PAYEE_NAME', (array_key_exists('b', $options)) ? $options['b'] : 'Acme, Inc'); } -if (!defined('AMOUNT')) { - define('AMOUNT', (array_key_exists('a', $options)) ? $options['a'] : '$10.00'); +if (!defined('VERIFY_AMOUNT')) { + define('VERIFY_AMOUNT', (array_key_exists('a', $options)) ? $options['a'] : '$10.00'); } -if (!defined('WORKFLOW_ID')) { - define('WORKFLOW_ID', (array_key_exists('w', $options)) ? $options['w'] : 4); +if (!defined('VERIFY_WORKFLOW_ID')) { + define('VERIFY_WORKFLOW_ID', (array_key_exists('w', $options)) ? $options['w'] : 4); } -if (is_null(RECIPIENT_NUMBER)) { - echo "Please supply a NUMBER to send a verification request to." +if (is_null(VERIFY_NUMBER)) { + echo "Please supply a VERIFY_NUMBER to send a verification request to." . PHP_EOL . PHP_EOL . $helpText; exit(1); } -$request = new \Vonage\Verify\RequestPSD2(RECIPIENT_NUMBER, BRAND_NAME, AMOUNT, (int) WORKFLOW_ID); +$request = new \Vonage\Verify\RequestPSD2(VERIFY_NUMBER, VERIFY_PAYEE_NAME, VERIFY_AMOUNT, (int) VERIFY_WORKFLOW_ID); $response = $client->verify()->requestPSD2($request); echo "Started verification, `request_id` is " . $response['request_id']; diff --git a/verify/trigger_next_event.php b/verify/trigger_next_event.php index cd80510..39ae920 100644 --- a/verify/trigger_next_event.php +++ b/verify/trigger_next_event.php @@ -3,13 +3,13 @@ require_once __DIR__ . '/../vendor/autoload.php'; // Support direct execution from command line or via a GET request as a web server -define('REQUEST_ID', isset($argv[1])? $argv[1]: $_GET['request_id']); +define('VERIFY_REQUEST_ID', isset($argv[1])? $argv[1]: $_GET['request_id']); -error_log('Triggering next event for `request_id`' . REQUEST_ID); +error_log('Triggering next event for `request_id`' . VERIFY_REQUEST_ID); $basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); $client = new \Vonage\Client(new \Vonage\Client\Credentials\Container($basic)); -$result = $client->verify()->trigger(REQUEST_ID); +$result = $client->verify()->trigger(VERIFY_REQUEST_ID); var_dump($result->getResponseData()); \ No newline at end of file diff --git a/verify/verify.php b/verify/verify.php index 631a73b..db63a6e 100644 --- a/verify/verify.php +++ b/verify/verify.php @@ -3,19 +3,19 @@ require_once __DIR__ . '/../vendor/autoload.php'; // Support direct execution from command line or via a GET request as a web server -if (!defined('REQUEST_ID')) { - define('REQUEST_ID', isset($argv[1])? $argv[1]: $_GET['request_id']); +if (!defined('VERIFY_REQUEST_ID')) { + define('VERIFY_REQUEST_ID', isset($argv[1])? $argv[1]: $_GET['request_id']); } -if (!defined('CODE')) { - define('CODE', isset($argv[2])? $argv[2]: $_GET['pin_code']); +if (!defined('VERIFY_CODE')) { + define('VERIFY_CODE', isset($argv[2])? $argv[2]: $_GET['pin_code']); } -error_log('Verifying code ' . CODE . ' is correct for request ' . REQUEST_ID); +error_log('Verifying code ' . VERIFY_CODE . ' is correct for request ' . VERIFY_REQUEST_ID); $basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); $client = new \Vonage\Client(new \Vonage\Client\Credentials\Container($basic)); -$result = $client->verify()->check(REQUEST_ID, CODE); +$result = $client->verify()->check(VERIFY_REQUEST_ID, VERIFY_CODE); var_dump($result->getResponseData()); \ No newline at end of file diff --git a/verify2/cancel-request.php b/verify2/cancel-request.php index e8bc37c..2b966ad 100644 --- a/verify2/cancel-request.php +++ b/verify2/cancel-request.php @@ -7,6 +7,6 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\SMSRequest(TO_NUMBER, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\SMSRequest(VERIFY_NUMBER, 'my-verification'); -$client->verify2()->cancel(REQUEST_ID); \ No newline at end of file +$client->verify2()->cancel(VERIFY_REQUEST_ID); \ No newline at end of file diff --git a/verify2/check-verification-code.php b/verify2/check-verification-code.php index 308c3ae..3b70a32 100644 --- a/verify2/check-verification-code.php +++ b/verify2/check-verification-code.php @@ -8,7 +8,7 @@ ); try { - $client->verify2()->check(REQUEST_ID, CODE); + $client->verify2()->check(VERIFY_REQUEST_ID, CODE); } catch (\Exception $e) { var_dump($e->getMessage()); } diff --git a/verify2/create-template-fragment.php b/verify2/create-template-fragment.php index 4c40f6c..4a8f89c 100644 --- a/verify2/create-template-fragment.php +++ b/verify2/create-template-fragment.php @@ -13,4 +13,4 @@ 'The authentication code for your ${brand} is: ${code}' ); -$client->verify2()->createCustomTemplateFragment(TEMPLATE_ID, $createFragmentRequest); +$client->verify2()->createCustomTemplateFragment(VERIFY_TEMPLATE_ID, $createFragmentRequest); diff --git a/verify2/delete-fragment.php b/verify2/delete-fragment.php index ed8bcce..4f489c8 100644 --- a/verify2/delete-fragment.php +++ b/verify2/delete-fragment.php @@ -7,4 +7,4 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$client->verify2()->deleteCustomTemplateFragment(TEMPLATE_ID, TEMPLATE_FRAGMENT_ID); +$client->verify2()->deleteCustomTemplateFragment(VERIFY_TEMPLATE_ID, VERIFY_TEMPLATE_FRAGMENT_ID); diff --git a/verify2/delete-template.php b/verify2/delete-template.php index a610384..e86536f 100644 --- a/verify2/delete-template.php +++ b/verify2/delete-template.php @@ -7,4 +7,4 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$client->verify2()->deleteCustomTemplate(TEMPLATE_ID); +$client->verify2()->deleteCustomTemplate(VERIFY_TEMPLATE_ID); diff --git a/verify2/get-fragment.php b/verify2/get-fragment.php index 0ce4c52..6b875d5 100644 --- a/verify2/get-fragment.php +++ b/verify2/get-fragment.php @@ -7,4 +7,4 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$fragment = $client->verify2()->getCustomTemplateFragment(TEMPLATE_ID, TEMPLATE_FRAGMENT_ID); +$fragment = $client->verify2()->getCustomTemplateFragment(VERIFY_TEMPLATE_ID, VERIFY_TEMPLATE_FRAGMENT_ID); diff --git a/verify2/get-template.php b/verify2/get-template.php index ffef848..5493980 100644 --- a/verify2/get-template.php +++ b/verify2/get-template.php @@ -7,4 +7,4 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$template = $client->verify2()->getCustomTemplate(TEMPLATE_ID); +$template = $client->verify2()->getCustomTemplate(VERIFY_TEMPLATE_ID); diff --git a/verify2/list-fragments.php b/verify2/list-fragments.php index c71c539..cb01d81 100644 --- a/verify2/list-fragments.php +++ b/verify2/list-fragments.php @@ -7,4 +7,4 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$fragment = $client->verify2()->listTemplateFragments(TEMPLATE_ID); +$fragment = $client->verify2()->listTemplateFragments(VERIFY_TEMPLATE_ID); diff --git a/verify2/list-templates.php b/verify2/list-templates.php index bb0d3ef..a382d7c 100644 --- a/verify2/list-templates.php +++ b/verify2/list-templates.php @@ -7,4 +7,4 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$template = $client->verify2()->listCustomTemplates(TEMPLATE_ID); +$template = $client->verify2()->listCustomTemplates(VERIFY_TEMPLATE_ID); diff --git a/verify2/send-request-email.php b/verify2/send-request-email.php index eb9e92e..826987f 100644 --- a/verify2/send-request-email.php +++ b/verify2/send-request-email.php @@ -7,5 +7,5 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\EmailRequest(TO_EMAIL, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\EmailRequest(VERIFY_TO_EMAIL, VERIFY_BRAND_NAME, VERIFY_FROM_EMAIL); $client->verify2()->startVerification($newRequest); diff --git a/verify2/send-request-silent-auth.php b/verify2/send-request-silent-auth.php index 370bace..4fbf2de 100644 --- a/verify2/send-request-silent-auth.php +++ b/verify2/send-request-silent-auth.php @@ -7,5 +7,5 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\SilentAuthRequest(TO_NUMBER, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\SilentAuthRequest(VERIFY_NUMBER, 'my-verification'); $client->verify2()->startVerification($newRequest); diff --git a/verify2/send-request-sms.php b/verify2/send-request-sms.php index 6d3376a..89e6769 100644 --- a/verify2/send-request-sms.php +++ b/verify2/send-request-sms.php @@ -7,5 +7,5 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\SMSRequest(TO_NUMBER, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\SMSRequest(VERIFY_NUMBER, 'my-verification'); $client->verify2()->startVerification($newRequest); diff --git a/verify2/send-request-voice.php b/verify2/send-request-voice.php index b0d76cc..4f11435 100644 --- a/verify2/send-request-voice.php +++ b/verify2/send-request-voice.php @@ -7,5 +7,5 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\VoiceRequest(TO_NUMBER, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\VoiceRequest(VERIFY_NUMBER, 'my-verification'); $client->verify2()->startVerification($newRequest); diff --git a/verify2/send-request-whatsapp-interactive.php b/verify2/send-request-whatsapp-interactive.php index 0645594..87afb59 100644 --- a/verify2/send-request-whatsapp-interactive.php +++ b/verify2/send-request-whatsapp-interactive.php @@ -7,5 +7,5 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\WhatsAppInteractiveRequest(TO_NUMBER, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\WhatsAppInteractiveRequest(VERIFY_NUMBER, 'my-verification'); $client->verify2()->startVerification($newRequest); diff --git a/verify2/send-request-whatsapp.php b/verify2/send-request-whatsapp.php index c059566..779b949 100644 --- a/verify2/send-request-whatsapp.php +++ b/verify2/send-request-whatsapp.php @@ -7,5 +7,5 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\WhatsAppRequest(TO_NUMBER, 'my-verification'); +$newRequest = new \Vonage\Verify2\Request\WhatsAppRequest(VERIFY_NUMBER, 'my-verification'); $client->verify2()->startVerification($newRequest); diff --git a/verify2/send-request-with-fallback.php b/verify2/send-request-with-fallback.php index 06ebfe6..bc1af18 100644 --- a/verify2/send-request-with-fallback.php +++ b/verify2/send-request-with-fallback.php @@ -7,7 +7,7 @@ new Vonage\Client\Credentials\Keypair(VONAGE_APPLICATION_PRIVATE_KEY_PATH, VONAGE_APPLICATION_ID), ); -$newRequest = new \Vonage\Verify2\Request\SilentAuthRequest(TO_NUMBER, 'my-verification'); -$emailWorkflow = new \Vonage\Verify2\VerifyObjects\VerificationWorkflow(\Vonage\Verify2\VerifyObjects\VerificationWorkflow::WORKFLOW_EMAIL, TO_EMAIL); +$newRequest = new \Vonage\Verify2\Request\SilentAuthRequest(VERIFY_NUMBER, 'my-verification'); +$emailWorkflow = new \Vonage\Verify2\VerifyObjects\VerificationWorkflow(\Vonage\Verify2\VerifyObjects\VerificationWorkflow::WORKFLOW_EMAIL, VERIFY_TO_EMAIL); $newRequest->addWorkflow($emailWorkflow); $client->verify2()->startVerification($newRequest); diff --git a/verify2/update-template-fragment.php b/verify2/update-template-fragment.php index 8bfd297..2962ab9 100644 --- a/verify2/update-template-fragment.php +++ b/verify2/update-template-fragment.php @@ -8,7 +8,7 @@ ); $client->verify2()->updateCustomTemplateFragment( - TEMPLATE_ID, - TEMPLATE_FRAGMENT_ID, + VERIFY_TEMPLATE_ID, + VERIFY_TEMPLATE_FRAGMENT_ID, 'The authentication code for your ${brand} is: ${code}' ); diff --git a/verify2/update-template.php b/verify2/update-template.php index ceec4e7..7dc23ac 100644 --- a/verify2/update-template.php +++ b/verify2/update-template.php @@ -9,4 +9,4 @@ $updateRequest = new UpdateCustomTemplateRequest('my-renamed-template', true); -$client->verify2()->updateCustomTemplate(TEMPLATE_ID, $updateRequest); +$client->verify2()->updateCustomTemplate(VERIFY_TEMPLATE_ID, $updateRequest); From ac0e918ec2dacfe3c49c07fc9ca6222760e6d6f2 Mon Sep 17 00:00:00 2001 From: Jim Seconde Date: Wed, 5 Feb 2025 10:53:55 +0000 Subject: [PATCH 2/2] Add GNP snippets --- .../number-verification/verify-phone-number.php | 14 ++++++++++++++ network-apis/sim-swap/check-sim-swap-date.php | 14 ++++++++++++++ network-apis/sim-swap/check-sim-swap.php | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 network-apis/number-verification/verify-phone-number.php create mode 100644 network-apis/sim-swap/check-sim-swap-date.php create mode 100644 network-apis/sim-swap/check-sim-swap.php diff --git a/network-apis/number-verification/verify-phone-number.php b/network-apis/number-verification/verify-phone-number.php new file mode 100644 index 0000000..c6bebeb --- /dev/null +++ b/network-apis/number-verification/verify-phone-number.php @@ -0,0 +1,14 @@ +numberVerification()->verifyNumber(PHONE_NUMBER); \ No newline at end of file diff --git a/network-apis/sim-swap/check-sim-swap-date.php b/network-apis/sim-swap/check-sim-swap-date.php new file mode 100644 index 0000000..e82a991 --- /dev/null +++ b/network-apis/sim-swap/check-sim-swap-date.php @@ -0,0 +1,14 @@ +simswap()->checkSimSwapDate(PHONE_NUMBER); \ No newline at end of file diff --git a/network-apis/sim-swap/check-sim-swap.php b/network-apis/sim-swap/check-sim-swap.php new file mode 100644 index 0000000..a6b2777 --- /dev/null +++ b/network-apis/sim-swap/check-sim-swap.php @@ -0,0 +1,14 @@ +simswap()->checkSimSwap(PHONE_NUMBER); \ No newline at end of file