mangopay/php-sdk-v2
Mangopay PHP SDK is a client library for the Mangopay REST API, letting PHP developers integrate payment flows, wallets, and transactions. Requires PHP 5.6+, cURL, OpenSSL, and psr/log; installable via Composer.
CreatePayPalExtendedPreauthorization(), PayPalExtendedPreauthorization, and polymorphic returns from Get()/Update()/GetAllForUser()). This is a new payment-method decision we can now make cheaply — supporting PayPal preauthorized payments may improve conversion for consumer-facing flows without a separate integration.ApiExtendedPreauthorizations ($api->ExtendedPreauthorizations), ExtendedPreauthorizationStatus, and Transaction::$ExtendedPreauthorizationId.ApiDeposits, DepositStatus, Transaction::$DepositId, or CreatePayInDepositPreauthorizedWithoutComplement().DepositId mappings, schedule a migration to the extended equivalents (low effort — the new API mirrors deposits) as technical debt before the next major upgrade.SETTLEMENT_CREATED, SETTLEMENT_RECONCILED, SETTLEMENT_PARTIALLY_MATCHED, SETTLEMENT_UNMATCHED, SETTLEMENT_INSUFFICIENT_FUNDS, SETTLEMENT_FAILED, etc.) unlock webhook-driven reconciliation dashboards and exception alerts for marketplaces and payout-heavy products — a candidate Phase 2/3 roadmap item that previously would have required custom polling.ProfilingAttemptReference on UserNaturalSca/UserLegalSca supports SCA/KYC profiling flows, giving us more control over 3DS/SCA success rates and auditability in EU-regulated onboarding — a conversion and compliance lever.ProfilingAttemptReference), bank account linking, and extended-preauthorization-based payment flows.EXTENDED_PREAUTHORIZATION_PAYMENT_VALIDATED, ..._EXPIRED, ..._CANCELED) for lifecycle automation."This SDK lets us launch payment features in weeks, not months, on Mangopay’s PCI-compliant infrastructure — and the vendor is actively shipping new capability, which de-risks our buy decision.
What v5.1.0 changes for us:
Ask: "Should we prioritize PayPal extended preauthorizations for [Phase 2] and fund a small reconciliation dashboard off the new settlement events to hit [revenue/margin goal]?"
"Drop-in PHP SDK for Mangopay’s API — OAuth/mTLS, retries, pagination, and error parsing are handled. v5.1.0 additions change our implementation choices:
ApiExtendedPreauthorizations ($api->ExtendedPreauthorizations) mirrors the deposits API with Create(), CreatePayPalExtendedPreauthorization(), Get(), Update(), GetAllForUser(), GetAllForCard(), and GetTransactions(), backed by /extended-preauthorizations. Deposits (ApiDeposits), DepositStatus, Transaction::$DepositId, and CreatePayInDepositPreauthorizedWithoutComplement() are deprecated and slated for removal in a future major.Get(), Update(), and GetAllForUser() return PayPalExtendedPreauthorization when created via PayPal, otherwise ExtendedPreauthorization. Type-check before persisting; don’t assume a single concrete class.Transaction::$ExtendedPreauthorizationId replaces $DepositId. Any schema, DTO, or mapping keyed on DepositId must migrate.ApiPayIns::CreatePayInExtendedPreauthorized(CreatePreAuthorizedExtendedPayIn $payIn) → POST /payins/extended-preauthorized/direct/full-capture. Note it’s full-capture — partial/complementary capture semantics should be validated against our product requirements before committing.EXTENDED_PREAUTHORIZATION_* and SETTLEMENT_* EventType constants. Settlement events are a good fit for an idempotent reconciliation consumer.ProfilingAttemptReference on UserNaturalSca/UserLegalSca — thread through onboarding if we use profiling.Key trade-offs:
mangopay/php-sdk-v2 to a tested patch/minor range.Recommendation: Build all new payment flows on extended preauthorizations, add settlement-event reconciliation to the backlog, and schedule a DepositId → ExtendedPreauthorizationId sweep if any deposit surfaces exist. Re-evaluate alternatives only for niche needs outside Mangopay’s scope."
Ask: "Should we allocate [X dev weeks] to integrate extended preauthorizations + settlement reconciliation for [specific feature], and lock the SDK version to 5.1.x?"
How can I help you explore Laravel packages today?