# Fork the repository on GitHub, then clone your forkgit clone https://github.com/YOUR-USERNAME/mangopay4-php-sdk.gitcd mangopay4-php-sdk# Add upstream remotegit remote add upstream https://github.com/Mangopay/mangopay4-php-sdk.git
# Update your local repositorygit fetch upstreamgit checkout mastergit merge upstream/master# Create a feature branchgit checkout -b feature/your-feature-name# Or for bug fixesgit checkout -b fix/issue-description
<?phpnamespace MangoPay;// Class names: PascalCaseclass UserNatural extends User{ // Properties: PascalCase (Mangopay convention) public $FirstName; public $LastName; public $Email; // Methods: PascalCase (Mangopay convention) public function GetFullName() { return $this->FirstName . ' ' . $this->LastName; }}
Formatting:
Use 4 spaces for indentation (no tabs)
Opening braces on the same line for methods
One blank line between methods
No trailing whitespace
Documentation:Add PHPDoc comments for all classes and methods:
/** * Creates a new natural user * @param UserNatural $user The user to create * @return UserNatural The created user with ID * @throws Libraries\ResponseException */public function CreateNatural($user){ return $this->CreateObject('users_createnaturals', $user, '\MangoPay\UserNatural');}
# Run all testsvendor/bin/phpunit tests/# Run specific test filevendor/bin/phpunit tests/Cases/UsersTest.php# Run specific test methodvendor/bin/phpunit --filter test_Users_CreateNatural tests/Cases/UsersTest.php
The project includes Docker configurations for testing across PHP versions:
# Build and run tests in PHP 7.4docker-compose -f docker-compose.php74.yml up --build# PHP 8.0docker-compose -f docker-compose.php80.yml up --build# PHP 8.1docker-compose -f docker-compose.php81.yml up --build
feat: Add support for Bizum PayInImplements the new Bizum payment method as per API release note.- Add BizumPayIn class- Add CreateBizumPayIn method to ApiPayins- Include tests for Bizum PayIn flowCloses #123
## DescriptionBrief description of what this PR does.## Related IssueFixes #(issue number)## Type of Change- [ ] Bug fix (non-breaking change which fixes an issue)- [ ] New feature (non-breaking change which adds functionality)- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)- [ ] Documentation update## TestingDescribe the tests you ran and how to reproduce them.## Checklist- [ ] My code follows the project's code style- [ ] I have performed a self-review of my own code- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] My changes generate no new warnings- [ ] I have added tests that prove my fix is effective or that my feature works- [ ] New and existing unit tests pass locally with my changes
Steps to Reproduce: Detailed steps to reproduce the bug
Expected Behavior: What you expected to happen
Actual Behavior: What actually happened
Code Sample: Minimal code that reproduces the issue (remove credentials!)
Error Messages: Full error message and stack trace
Template:
## Bug DescriptionA clear description of the bug.## Environment- SDK Version: 3.50.1- PHP Version: 8.1.0- Environment: Sandbox## Steps to Reproduce1. Create a user with...2. Call method...3. See error## Expected BehaviorThe method should return...## Actual BehaviorInstead, it throws...## Code Sample```php$api = new MangoPayApi();// Your code here (remove credentials!)
### Feature RequestsFor feature requests, please include:1. **Use Case:** Why do you need this feature?2. **Current Workaround:** How are you handling this now?3. **Proposed Solution:** How you envision the feature working4. **API Support:** Does the Mangopay API already support this?## Code Review Process### What We Look For- **Correctness:** Does the code work as intended?- **Tests:** Are there adequate tests?- **Documentation:** Is the code well-documented?- **Style:** Does it follow project conventions?- **Backwards Compatibility:** Does it break existing code?- **Performance:** Are there any performance concerns?### Response TimeMaintainers typically respond to PRs within:- **Initial review:** 1-2 weeks- **Follow-up reviews:** 3-5 business days## Release Process### Version NumberingThe SDK follows [Semantic Versioning](https://semver.org/):- **Major version (X.0.0):** Breaking changes- **Minor version (0.X.0):** New features (backwards compatible)- **Patch version (0.0.X):** Bug fixes (backwards compatible)### Release ChecklistFor maintainers preparing a release:1. Update version in `composer.json`2. Update `CHANGELOG.md`3. Run full test suite4. Create release tag5. Publish to Packagist6. Update GitHub release notes## Community Guidelines### Code of Conduct- Be respectful and inclusive- Focus on constructive feedback- Assume good intentions- No harassment or discrimination### Getting Help- **Questions:** Use GitHub Discussions- **Bugs:** Open a GitHub Issue- **Security Issues:** Email [email protected] (do not open public issues)## RecognitionContributors are recognized in:- GitHub Contributors page- CHANGELOG.md (for significant contributions)- Release notes## Additional Resources<CardGroup cols={2}> <Card title="GitHub Repository" icon="github" href="https://github.com/Mangopay/mangopay4-php-sdk"> View source code and issues </Card> <Card title="API Documentation" icon="book" href="https://docs.mangopay.com"> Mangopay API reference </Card> <Card title="Packagist" icon="box" href="https://packagist.org/packages/mangopay4/php-sdk"> PHP package repository </Card> <Card title="Changelog" icon="clock" href="/resources/changelog"> Version history </Card></CardGroup>## LicenseBy contributing to the Mangopay PHP SDK, you agree that your contributions will be licensed under the MIT License.<Note>Thank you for contributing to the Mangopay PHP SDK! Your contributions help improve the experience for developers worldwide.</Note>