- Is paymob/php-library the official Paymob SDK, and can I use it with Laravel?
- It appears to be a vendor-published Paymob SDK hosted on GitLab under the paymob-integrations group, but you should confirm the namespace is genuinely Paymob-owned and identify the accountable maintainer before committing. It is a plain PHP Composer library rather than a Laravel package, so it can be used inside Laravel but should be wrapped in your own adapter. There is no evidence of a service provider, facade, or config publish stub.
- How do I install paymob/php-library with Composer?
- Install it with Composer, but first verify whether it is published on Packagist with tagged semver releases. If it is not, add it as a VCS repository entry in composer.json pinned to a commit SHA, which means no caret constraint and a manual diff review for every bump. Treat that pinning requirement as an explicit governance cost rather than a temporary workaround.
- Does paymob/php-library provide a Laravel service provider or facade?
- No. The evaluation found no evidence of a Laravel service provider, config publish stub, facade, or framework-agnostic contract layer. Integration work therefore lands in your codebase as a thin adapter containing config, a provider, and a gateway class implementing your own PaymentGateway interface. That seam is arguably better because you own it and the vendor library stays replaceable.
- Which Paymob products and operations does this library cover?
- The overview mentions wrappers for authentication, order creation, payment key generation, and transaction handling, and the context notes the gateway covers Card/Accept, Wallet, Kiosk, and related rails. However, exact coverage of auth token, order registration, payment key request, iframe redirect, HMAC verification, refund, void, capture, and card tokenization or MOTO must be verified in the source before commitment. Do not assume Wallet, Kiosk, or Installments support without checking.
- Does paymob/php-library verify webhook HMAC signatures?
- The available context does not answer this definitively, so it is a blocking question to resolve by reading the source. If the library does not expose HMAC computation or verification helpers, implement verification yourself against Paymob's documented concatenation order rather than guessing. Webhook authenticity is money-critical, so test this path explicitly in the sandbox.
- Does paymob/php-library use Guzzle, and how do I test it in Laravel?
- It is not confirmed whether the library abstracts HTTP transport via PSR-18 and PSR-7 or hard-codes Guzzle or cURL. Hard-coded transport complicates Laravel's HTTP client mocking strategy and your test suite. Check the source, and if transport is coupled, isolate it behind your adapter and rely on contract tests against Paymob's sandbox.
- What PHP versions does paymob/php-library support?
- This is not specified in the available documentation and is listed as an open blocking question. Check composer.json for the PHP requirement before adopting it, and confirm it matches your Laravel version's minimum PHP. Test on your actual runtime rather than trusting a claimed range.
- Is paymob/php-library safe to use in production?
- Treat it as an external vendor dependency rather than a community-vetted open source package: it has no stars, zero dependents, and no community backstop, so you are the first line of defense. Verify the license permits commercial closed-source use, confirm the GitLab namespace is genuinely Paymob-owned, and check release hygiene. Wrap it behind your own PaymentGateway interface and run contract tests against Paymob's sandbox before production.
- How should I structure a Laravel integration around paymob/php-library?
- Build a thin adapter: a config file for credentials, a service provider binding a PaymobGateway class that implements your own PaymentGateway contract, and typed exceptions mapped from the library's raw responses. Keep HMAC verification, retries, idempotency, and logging in the adapter rather than scattered through controllers. This keeps the vendor library replaceable if maintenance or support degrades.
- What are the alternatives to paymob/php-library?
- You can build a small first-party client against Paymob's documented REST API using Laravel's HTTP client, or check whether Paymob publishes another official SDK or a first-party Laravel package. Given the low package health signals here, a minimal in-house client with contract tests is a credible alternative. Weigh that against the ongoing cost of tracking Paymob API changes yourself.