From 42683caa6d99a282e4a807b74635cb0cf6cb1595 Mon Sep 17 00:00:00 2001 From: Mohsin Mamoon Hafiz Plivo Date: Wed, 23 Oct 2024 11:54:27 +0530 Subject: [PATCH] SMS-7107: Add fraud_check param support (#352) * SMS-7107: Add fraud_check param support * Update date --- CHANGELOG.md | 7 ++++++- Makefile | 6 +++++- src/Plivo/Resources/Verify/VerifySession.php | 1 + src/Plivo/Version.php | 2 +- tests/Mocks/verifySessionListResponse.json | 13 ++++++++++++- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33427b39..47473394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,14 @@ # Change Log +## [4.66.2](https://github.com/plivo/plivo-php/tree/v4.66.2) (2024-10-23) +**Feature - FraudCheck param in Create, Get and List Session** +- Support for the `fraud_check` parameter in sms verify session request +- Added support for `fraud_check` in GET and LIST verify session. + ## [4.66.1](https://github.com/plivo/plivo-php/tree/v4.66.1)(2024-10-10) **Feature - Dtmf param in Create, Get and List Session** - Support for the `dtmf` parameter in voice verify session request - Added support for `dtmf` in GET and LIST verify session. -- + ## [4.66.0](https://github.com/plivo/plivo-php/tree/v4.66.0)(2024-09-30) **Feature - Adding new param support for Number Masking session with single party ** - Added `create_session_with_single_party`, `virtual_number_cooloff_period` and `force_pin_authentication` attributes in Masking Session diff --git a/Makefile b/Makefile index ef7d0038..355f4e6c 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,11 @@ build: start: docker-compose up --build --remove-orphans --detach - docker attach $(shell docker-compose ps -q phpSDK) + # Wait for the container to be running before attaching + @while [ -z "$$(docker-compose ps -q phpSDK)" ]; do \ + sleep 1; \ + done + docker attach $$(docker-compose ps -q phpSDK) test: @[ "${CONTAINER}" ] && \ diff --git a/src/Plivo/Resources/Verify/VerifySession.php b/src/Plivo/Resources/Verify/VerifySession.php index 474b796d..2e5adcc2 100644 --- a/src/Plivo/Resources/Verify/VerifySession.php +++ b/src/Plivo/Resources/Verify/VerifySession.php @@ -26,6 +26,7 @@ * @property string $created_at * @property string $updated_at * @property ?int $dtmf + * @property ?string $fraud_check */ class VerifySession extends Resource { diff --git a/src/Plivo/Version.php b/src/Plivo/Version.php index 85e93979..a70fc6e9 100644 --- a/src/Plivo/Version.php +++ b/src/Plivo/Version.php @@ -26,7 +26,7 @@ class Version * @const int PHP helper library patch number */ - const PATCH = 1; + const PATCH = 2; /** * @return string diff --git a/tests/Mocks/verifySessionListResponse.json b/tests/Mocks/verifySessionListResponse.json index 2db47111..df5f00b6 100644 --- a/tests/Mocks/verifySessionListResponse.json +++ b/tests/Mocks/verifySessionListResponse.json @@ -129,11 +129,17 @@ "channel": "sms", "status": "expired", "locale":"en", - "count": 2, + "count": 3, "requestor_ip": "110.226.182.196", "destination_country_iso2": "IN", "destination_network": "AirTel", "attempt_details": [ + { + "channel": "sms", + "attemp_uuid": "c8f5830a-65d2-46db-9088-5001627e65a8", + "status": "failed", + "time": "2023-07-28T17:07:02.280023+05:30" + }, { "channel": "sms", "attempt_uuid": "c8f5830a-65d2-46db-9088-5001627e65a9", @@ -151,6 +157,11 @@ "total_charge": "0.48000", "validation_charge": "0.0000", "attempt_charges": [ + { + "attempt_uuid": "c8f5830a-65d2-46db-9088-5001627e65a8", + "channel": "sms", + "charge": "0.000000" + }, { "attempt_uuid": "c8f5830a-65d2-46db-9088-5001627e65a9", "channel": "sms",