Skip to content

Commit e9b5a47

Browse files
Merge pull request #770 from Mangopay/rel/3.49.0
[release] 3.49.0
2 parents 123c073 + 6e452c1 commit e9b5a47

File tree

14 files changed

+190
-47
lines changed

14 files changed

+190
-47
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [3.49.0] - 2026-01-27
2+
### Added
3+
- Support for new [GET View the SCA status of a User](https://docs.mangopay.com/api-reference/users/view-user-sca-status) endpoint ([API release note](https://docs.mangopay.com/release-notes/api/2026-01-15)) (#766)
4+
- Support for new [event types](https://docs.mangopay.com/webhooks/event-types#mangopay-sca-email-and-phone-number-verification) `SCA_CONTACT_INFORMATION_UPDATE_CONSENT_GIVEN`, `SCA_CONTACT_INFORMATION_UPDATE_CONSENT_REVOKED`, `SCA_TRANSFER_CONSENT_GIVEN`, `SCA_TRANSFER_CONSENT_REVOKED`, `SCA_RECIPIENT_REGISTRATION_CONSENT_GIVEN`, `SCA_RECIPIENT_REGISTRATION_CONSENT_REVOKED`, `SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_GIVEN`, `SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_REVOKED`, `SCA_EMAIL_VERIFIED`, `SCA_PHONE_NUMBER_VERIFIED` (#765) (thank you @williamdes)
5+
- Support for new `RecipientId` property on [payouts](https://docs.mangopay.com/api-reference/payouts/create-payout) ([API release note](https://docs.mangopay.com/release-notes/api/2026-01-27)) (#759)
6+
7+
Release PR: #770
8+
19
## [3.48.0] - 2025-11-28
210
### Changed
311
- Migrated to V4 naming convention

MangoPay/ApiUsers.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,14 @@ public function Close($user)
602602

603603
$this->DeleteObject($methodKey, $user);
604604
}
605+
606+
/**
607+
* Get SCA status
608+
* @param string $userId User identifier
609+
* @return ScaStatus ScaStatus object returned from API
610+
*/
611+
public function GetScaStatus($userId)
612+
{
613+
return $this->GetObject('users_get_sca_status', 'MangoPay\ScaStatus', $userId);
614+
}
605615
}

MangoPay/ConsentScope.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace MangoPay;
4+
5+
class ConsentScope extends Libraries\Dto
6+
{
7+
/**
8+
* @var string|null
9+
*/
10+
public $ContactInformationUpdate;
11+
12+
/**
13+
* @var string|null
14+
*/
15+
public $RecipientRegistration;
16+
17+
/**
18+
* @var string|null
19+
*/
20+
public $Transfer;
21+
22+
/**
23+
* @var string|null
24+
*/
25+
public $ViewAccountInformation;
26+
}

MangoPay/EventType.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class EventType
6565
const UboDeclarationIncomplete = "UBO_DECLARATION_INCOMPLETE";
6666
const UserKycRegular = "USER_KYC_REGULAR";
6767
const UserKycLight = "USER_KYC_LIGHT";
68+
const UserKycRenewalRequired = "USER_KYC_RENEWAL_REQUIRED";
69+
const UserKycRenewed = "USER_KYC_RENEWED";
6870
const UserInflowsBlocked = "USER_INFLOWS_BLOCKED";
6971
const UserInflowsUnblocked = "USER_INFLOWS_UNBLOCKED";
7072
const UserOutflowsBlocked = "USER_OUTFLOWS_BLOCKED";
@@ -124,6 +126,16 @@ class EventType
124126
const ScaEnrollmentSucceeded = "SCA_ENROLLMENT_SUCCEEDED";
125127
const ScaEnrollmentFailed = "SCA_ENROLLMENT_FAILED";
126128
const ScaEnrollmentExpired = "SCA_ENROLLMENT_EXPIRED";
129+
const ScaContactInformationUpdateConsentGiven = "SCA_CONTACT_INFORMATION_UPDATE_CONSENT_GIVEN";
130+
const ScaContactInformationUpdateConsentRevoked = "SCA_CONTACT_INFORMATION_UPDATE_CONSENT_REVOKED";
131+
const ScaTransferConsentGiven = "SCA_TRANSFER_CONSENT_GIVEN";
132+
const ScaTransferConsentRevoked = "SCA_TRANSFER_CONSENT_REVOKED";
133+
const ScaRecipientRegistrationConsentGiven = "SCA_RECIPIENT_REGISTRATION_CONSENT_GIVEN";
134+
const ScaRecipientRegistrationConsentRevoked = "SCA_RECIPIENT_REGISTRATION_CONSENT_REVOKED";
135+
const ScaViewAccountInformationConsentGiven = "SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_GIVEN";
136+
const ScaViewAccountInformationConsentRevoked = "SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_REVOKED";
137+
const ScaEmailVerified = "SCA_EMAIL_VERIFIED";
138+
const ScaPhoneNumberVerified = "SCA_PHONE_NUMBER_VERIFIED";
127139

128140
const UserCategoryUpdatedToOwner = "USER_CATEGORY_UPDATED_TO_OWNER";
129141
const UserCategoryUpdatedToPayer = "USER_CATEGORY_UPDATED_TO_PAYER";

MangoPay/Libraries/ApiBase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ protected function getLogger()
172172
'users_categorizelegals_sca' => ['/sca/users/legal/%s/category', RequestType::PUT],
173173
'users_close_natural' => ['/users/natural/%s', RequestType::DELETE],
174174
'users_close_legal' => ['/users/legal/%s', RequestType::DELETE],
175+
'users_get_sca_status' => ['/sca/users/%s/sca-status', RequestType::GET],
175176

176177
'validate_the_format_of_user_data' => ['/users/data-formats/validation', RequestType::POST],
177178

MangoPay/Libraries/RestTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
class RestTool
1414
{
15-
const VERSION = '3.48.0';
15+
const VERSION = '3.49.0';
1616

1717
/**
1818
* Root/parent instance that holds the OAuthToken and Configuration instance

MangoPay/PayOutPaymentDetailsBankWire.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88
class PayOutPaymentDetailsBankWire extends Libraries\Dto implements PayOutPaymentDetails
99
{
1010
/**
11-
* Bank account Id
12-
* @var string
11+
* Bank account identifier
12+
* Null if $RecipientId is provided
13+
* @var string|null
1314
*/
1415
public $BankAccountId;
1516

17+
/**
18+
* Recipient identifier
19+
* Null if $BankAccountId is provided
20+
* @var string|null
21+
*/
22+
public $RecipientId;
23+
1624
/**
1725
* A custom reference you wish to appear on the user’s bank statement
1826
* @var string

MangoPay/ScaStatus.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace MangoPay;
4+
5+
class ScaStatus extends Libraries\Dto
6+
{
7+
/**
8+
* @var string
9+
*/
10+
public $UserStatus;
11+
12+
/**
13+
* @var bool
14+
*/
15+
public $IsEnrolled;
16+
17+
/**
18+
* @var int|null
19+
*/
20+
public $LastEnrollmentDate;
21+
22+
/**
23+
* @var int|null
24+
*/
25+
public $LastConsentCollectionDate;
26+
27+
/**
28+
* @var ConsentScope|null
29+
*/
30+
public $ConsentScope;
31+
}

tests/Cases/Base.php

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use MangoPay\BrowserInfo;
1212
use MangoPay\CreateDeposit;
1313
use MangoPay\CurrencyIso;
14+
use MangoPay\IndividualRecipient;
1415
use MangoPay\LegalPersonType;
1516
use MangoPay\LegalRepresentative;
1617
use MangoPay\Libraries\Exception;
@@ -21,6 +22,7 @@
2122
use MangoPay\PayInIntentExternalData;
2223
use MangoPay\PayInIntentLineItem;
2324
use MangoPay\PayInIntentSeller;
25+
use MangoPay\Recipient;
2426
use MangoPay\ShippingPreference;
2527
use MangoPay\Tests\Mocks\MockStorageStrategy;
2628
use MangoPay\Ubo;
@@ -824,29 +826,36 @@ protected function getJohnsPayOutForCardDirect()
824826
$payIn = $this->getNewPayInCardDirect();
825827
$account = $this->getJohnsAccount();
826828

827-
$payOut = new \MangoPay\PayOut();
828-
$payOut->Tag = 'DefaultTag';
829-
$payOut->AuthorId = $payIn->AuthorId;
830-
$payOut->CreditedUserId = $payIn->AuthorId;
831-
$payOut->DebitedFunds = new \MangoPay\Money();
832-
$payOut->DebitedFunds->Currency = 'EUR';
833-
$payOut->DebitedFunds->Amount = 10;
834-
$payOut->Fees = new \MangoPay\Money();
835-
$payOut->Fees->Currency = 'EUR';
836-
$payOut->Fees->Amount = 5;
837-
838-
$payOut->DebitedWalletId = $payIn->CreditedWalletId;
839-
$payOut->MeanOfPaymentDetails = new \MangoPay\PayOutPaymentDetailsBankWire();
829+
$payOut = $this->getNewPayOutDto($payIn->AuthorId, $payIn->CreditedWalletId);
840830
$payOut->MeanOfPaymentDetails->BankAccountId = $account->Id;
841-
$payOut->MeanOfPaymentDetails->BankWireRef = 'Johns payment';
842-
$payOut->MeanOfPaymentDetails->PayoutModeRequested = 'STANDARD';
843831

844832
self::$JohnsPayOutForCardDirect = $this->_api->PayOuts->Create($payOut);
845833
}
846834

847835
return self::$JohnsPayOutForCardDirect;
848836
}
849837

838+
protected function getNewPayOutDto($authorId, $walletId)
839+
{
840+
$payOut = new \MangoPay\PayOut();
841+
$payOut->Tag = 'DefaultTag';
842+
$payOut->AuthorId = $authorId;
843+
$payOut->CreditedUserId = $authorId;
844+
$payOut->DebitedFunds = new \MangoPay\Money();
845+
$payOut->DebitedFunds->Currency = 'EUR';
846+
$payOut->DebitedFunds->Amount = 10;
847+
$payOut->Fees = new \MangoPay\Money();
848+
$payOut->Fees->Currency = 'EUR';
849+
$payOut->Fees->Amount = 5;
850+
851+
$payOut->DebitedWalletId = $walletId;
852+
$payOut->MeanOfPaymentDetails = new \MangoPay\PayOutPaymentDetailsBankWire();
853+
$payOut->MeanOfPaymentDetails->BankWireRef = 'Johns payment';
854+
$payOut->MeanOfPaymentDetails->PayoutModeRequested = 'STANDARD';
855+
856+
return $payOut;
857+
}
858+
850859
/**
851860
* Creates Pay-In Card Direct object
852861
* @return \MangoPay\PayIn
@@ -2275,4 +2284,29 @@ protected function getNewPayInIntentAuthorization()
22752284

22762285
return $this->_api->PayIns->CreatePayInIntentAuthorization($toCreate);
22772286
}
2287+
2288+
protected function getNewRecipientObject()
2289+
{
2290+
$localBankTransfer = [];
2291+
$gbpDetails = [];
2292+
$gbpDetails["SortCode"] = "010039";
2293+
$gbpDetails["AccountNumber"] = "11696419";
2294+
$localBankTransfer["GBP"] = $gbpDetails;
2295+
2296+
$individualRecipient = new IndividualRecipient();
2297+
$individualRecipient->FirstName = "Payout";
2298+
$individualRecipient->LastName = "Team";
2299+
$individualRecipient->Address = $this->getNewAddress();
2300+
2301+
$recipient = new Recipient();
2302+
$recipient->DisplayName = "My GB account";
2303+
$recipient->PayoutMethodType = "LocalBankTransfer";
2304+
$recipient->RecipientType = "Individual";
2305+
$recipient->Currency = CurrencyIso::GBP;
2306+
$recipient->IndividualRecipient = $individualRecipient;
2307+
$recipient->LocalBankTransfer = $localBankTransfer;
2308+
$recipient->Country = "GB";
2309+
2310+
return $recipient;
2311+
}
22782312
}

tests/Cases/EventsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function test_GetEventList_PayinNormalSucceeded()
4343
$pagination = new \MangoPay\Pagination();
4444
$pagination->ItemsPerPage = 100;// Increase the chance to find a result
4545

46+
sleep(10);
4647
$result = $this->_api->Events->GetAll($pagination, $filter);
4748

4849
$this->assertTrue(count($result) > 0);
@@ -58,7 +59,7 @@ public function test_GetEventList_PayoutNormalCreated()
5859
$filter->EventType = \MangoPay\EventType::PayoutNormalCreated;
5960
$pagination = new \MangoPay\Pagination();
6061

61-
sleep(5);
62+
sleep(10);
6263
$result = $this->_api->Events->GetAll($pagination, $filter);
6364

6465
$this->assertTrue(count($result) > 0);

0 commit comments

Comments
 (0)