{"id":50946114,"url":"https://github.com/globalpayments-samples/google-pay-payments","last_synced_at":"2026-06-17T20:07:36.338Z","repository":{"id":323019348,"uuid":"1062758053","full_name":"globalpayments-samples/google-pay-payments","owner":"globalpayments-samples","description":"Google Pay integration examples for Global Payments API Platform. Process encrypted mobile wallet payments with secure token handling.","archived":false,"fork":false,"pushed_at":"2026-04-15T20:20:39.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T22:14:12.360Z","etag":null,"topics":["api-platform","global-payments","google-pay","mobile-payments","payment-processing","tokeniation","wallet"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/globalpayments-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-23T17:27:40.000Z","updated_at":"2026-04-15T20:20:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/globalpayments-samples/google-pay-payments","commit_stats":null,"previous_names":["globalpayments-samples/google-pay-payments"],"tags_count":0,"template":false,"template_full_name":"globalpayments-samples/starter-template","purl":"pkg:github/globalpayments-samples/google-pay-payments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalpayments-samples%2Fgoogle-pay-payments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalpayments-samples%2Fgoogle-pay-payments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalpayments-samples%2Fgoogle-pay-payments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalpayments-samples%2Fgoogle-pay-payments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globalpayments-samples","download_url":"https://codeload.github.com/globalpayments-samples/google-pay-payments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalpayments-samples%2Fgoogle-pay-payments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34463588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-platform","global-payments","google-pay","mobile-payments","payment-processing","tokeniation","wallet"],"created_at":"2026-06-17T20:07:35.510Z","updated_at":"2026-06-17T20:07:36.331Z","avatar_url":"https://github.com/globalpayments-samples.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Pay Payments Integration\n\nThis project demonstrates Google Pay payment processing integration with the Global Payments GP-API across multiple programming languages. Each implementation shows how to handle encrypted mobile payment tokens from Google Pay and process them securely through the GP-API.\n\n## Available Implementations\n\n- [.NET Core](./dotnet/) - ([Preview](https://githubbox.com/globalpayments-samples/google-pay-payments/tree/main/dotnet)) - ASP.NET Core web application\n- [Java](./java/) - ([Preview](https://githubbox.com/globalpayments-samples/google-pay-payments/tree/main/java)) - Jakarta EE servlet-based web application\n- [PHP](./php/) - ([Preview](https://githubbox.com/globalpayments-samples/google-pay-payments/tree/main/php)) - PHP web application\n\n## Google Pay Features\n\n- **Google Pay Token Processing** - Handle encrypted mobile payment tokens\n- **GP-API Integration** - Secure processing through Global Payments GP-API\n- **Comprehensive Validation** - Input validation and error handling\n- **Production Ready** - Complete implementation with security best practices\n\n## Implementation Features\n\nEach implementation includes:\n\n1. **Google Pay Configuration**\n   - Merchant configuration endpoint\n   - Google Pay button settings\n   - Environment-specific configuration\n   - Currency and country code management\n\n2. **Payment Processing**\n   - GET `/config` - Google Pay merchant configuration\n   - POST `/process-google-pay` - Google Pay token processing\n   - Encrypted mobile token handling\n   - Multi-currency transaction support\n\n3. **Security \u0026 Validation**\n   - Token format validation\n   - Amount and currency validation\n   - Comprehensive error handling\n   - Transaction status verification\n\n## Quick Start\n\n1. **Choose your language** - Navigate to any implementation directory (dotnet, java, php)\n2. **Set up credentials** - Copy `.env.sample` to `.env` and add your Global Payments GP-API credentials\n3. **Configure Google Pay** - Update Google Pay merchant settings in `.env` file\n4. **Run the server** - Execute `./run.sh` to install dependencies and start the server\n5. **Test payments** - Use the web interface to test Google Pay transactions\n\n## Google Pay Integration Requirements\n\nTo use this integration, you'll need:\n\n- **Global Payments GP-API Account** - With Google Pay processing enabled\n- **Google Pay Merchant Account** - Registered with Google Pay\n- **SSL Certificate** - Required for Google Pay in production\n- **Development Environment** - For your chosen language (.NET, Java, or PHP)\n\n## Prerequisites\n\n- Global Payments GP-API account with credentials:\n  - `GP_API_APP_ID` - Your application ID\n  - `GP_API_APP_KEY` - Your application key\n- Google Pay merchant configuration:\n  - Google Merchant ID for Google Pay\n  - Merchant name and display settings\n- Development environment for your chosen language\n- Package manager (dotnet, maven, composer)\n\n## Configuration Guide\n\n### Environment Variables\n\nEach implementation uses the following environment variables:\n\n```bash\n# Global Payments GP-API Configuration\nGP_API_APP_ID=your_app_id_here\nGP_API_APP_KEY=your_app_key_here\nENVIRONMENT=TEST  # or PRODUCTION\nMERCHANT_ID=your_merchant_id\nMERCHANT_NAME=\"Your Merchant Name\"\n\n# Google Pay Configuration\nGOOGLE_PAY_MERCHANT_ID=12345678901234567890\nGOOGLE_PAY_COUNTRY_CODE=US\nGOOGLE_PAY_CURRENCY_CODE=USD\nGOOGLE_PAY_BUTTON_COLOR=black\n```\n\n### Google Pay Setup\n\n1. Register for a Google Pay merchant account\n2. Configure your merchant settings in the Google Pay console\n3. Add your domain to the allowed origins list\n4. Update the environment variables with your merchant information\n\n### Testing\n\n- Use Google Pay test cards for development\n- Ensure your development environment uses HTTPS for Google Pay\n- Test with multiple currencies if supporting international payments\n\n## API Endpoints\n\n### GET /config\nReturns Google Pay configuration for client-side initialization:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"merchantInfo\": {\n      \"merchantName\": \"Your Merchant Name\",\n      \"merchantId\": \"your_merchant_id\"\n    },\n    \"googlePayConfig\": {\n      \"googleMerchantId\": \"12345678901234567890\",\n      \"environment\": \"TEST\",\n      \"countryCode\": \"US\",\n      \"currencyCode\": \"USD\",\n      \"buttonColor\": \"black\"\n    }\n  }\n}\n```\n\n### POST /process-google-pay\nProcesses Google Pay payment tokens:\n\n**Request:**\n```json\n{\n  \"token\": \"{google_pay_encrypted_token}\",\n  \"amount\": \"10.00\",\n  \"currency\": \"USD\"\n}\n```\n\n**Success Response:**\n```json\n{\n  \"success\": true,\n  \"message\": \"Payment successful! Transaction ID: TXN_123456\",\n  \"data\": {\n    \"transactionId\": \"TXN_123456\",\n    \"amount\": \"10.00\",\n    \"currency\": \"USD\",\n    \"status\": \"SUCCESS\",\n    \"responseCode\": \"00\",\n    \"authCode\": \"AUTH123\",\n    \"timestamp\": \"2023-01-01T12:00:00Z\"\n  }\n}\n```\n\n## Test Cards\n\n| Brand | Number | CVV | Expiry |\n|-------|--------|-----|--------|\n| Visa | 4263 9826 4026 9299 | 123 | Any future |\n| Mastercard | 5425 2334 2424 1200 | 123 | Any future |\n\n\u003e Google Pay sandbox uses virtual test cards. Refer to the [Google Pay Test Cards](https://developers.google.com/pay/api/web/guides/resources/sample-tokens) docs for token-based testing.\n\n## Security Considerations\n\nThis implementation includes production-ready security features:\n- Input validation and sanitization\n- Encrypted token processing\n- Comprehensive error handling\n- Transaction verification\n- Secure credential management\n- Rate limiting recommendations\n- HTTPS enforcement for production\n\n## Resources\n\n- [Global Payments Developer Portal](https://developer.globalpayments.com/)\n- [API Reference](https://developer.globalpayments.com/api/references-overview)\n- [Test Cards](https://developer.globalpayments.com/resources/test-cards)\n- [PHP SDK](https://github.com/globalpayments/php-sdk)\n- [Java SDK](https://github.com/globalpayments/java-sdk)\n- [.NET SDK](https://github.com/globalpayments/dotnet-sdk)\n\n## Community\n\n- 🌐 **Developer Portal** — [developer.globalpayments.com](https://developer.globalpayments.com)\n- 💬 **Discord** — [Join the community](https://discord.gg/myER9G9qkc)\n- 📋 **GitHub Discussions** — [github.com/orgs/globalpayments/discussions](https://github.com/orgs/globalpayments/discussions)\n- 📧 **Newsletter** — [Subscribe](https://www.globalpayments.com/en-gb/modals/newsletter)\n- 💼 **LinkedIn** — [Global Payments for Developers](https://www.linkedin.com/showcase/global-payments-for-developers/posts/?feedView=all)\n\nHave a question or found a bug? [Open an issue](https://github.com/globalpayments-samples/google-pay-payments/issues) or reach out at [communityexperience@globalpay.com](mailto:communityexperience@globalpay.com).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobalpayments-samples%2Fgoogle-pay-payments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobalpayments-samples%2Fgoogle-pay-payments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobalpayments-samples%2Fgoogle-pay-payments/lists"}