Download the PHP package hds-solutions/bancard-sdk without Composer
On this page you can find all versions of the php package hds-solutions/bancard-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bancard-sdk
Bancard SDK
A comprehensive PHP SDK for integrating Bancard vPOS and Bancard VentasQR payment solutions into your applications.
Table of Contents
- Installation
- Configuration
- vPOS Integration
- Features
- Usage Examples
- Error Handling
- VentasQR Integration
- Features
- Usage Examples
- Advanced Usage
- API Reference
- Contributing
- License
Installation
Requirements
- PHP >= 8.0
Via composer
Configuration
Setting up Credentials
Environment Configuration
The SDK uses the staging environment by default for vPOS. Switch to production when ready:
vPOS Integration
vPOS Features
- Single payments
- Single payments through Zimple
- Card management
- Charge payments to registered cards
- Pre-authorization
- Transaction management (get confirmation and rollback payments)
vPOS Usage Examples
Single Payment Flow
Endpoint used to generate a process ID to call the Bancard <iframe>
for a one-time payment.
Single Payment Flow through Zimple
Same as above, but for Zimple
payments.
Card Management
-
Register a New Card
-
List User's Cards
-
Charge a Registered Card
- Get the confirmation of a Payment
Endpoint to get the confirmation of a payment. Example, in case the above charge request stayed as a pending of confirmation payment.
-
Rollback a Payment
- Remove a Registered Card
Error Handling
The SDK provides comprehensive error handling for various scenarios:
1. Basic Error Handling
2. Transaction Response Handling
3. Debug Information
VentasQR Integration
VentasQR Credentials
⚠ Important: VentasQR is not scoped by Bancard::useProduction()
, since your assigned domain will define your testing/production environment.
VentasQR Features
- Generate QR codes for payments
- Revert QR payments
VentasQR Usage Examples
-
Generate QR Code
- Revert QR Payment
Advanced Usage
Request/Response Inspection
Access request and response details for debugging:
Customizable requests
If you need, you can create a pending request and change the values on runtime. This applies to all available requests.
API Reference
vPOS Methods
Bancard::single_buy()
- Process a one-time paymentBancard::single_buy_zimple()
- Process a Zimple paymentBancard::card_new()
- Register a new cardBancard::users_cards()
- List user's registered cardsBancard::card_delete()
- Remove a registered cardBancard::charge()
- Charge a registered cardBancard::confirmation()
- Check payment statusBancard::preauthorizationConfirm()
- Confirm a pre-authorized paymentBancard::rollback()
- Cancel a pending transaction
VentasQR Methods
Bancard::qr_generate()
- Generate a QR code for paymentBancard::qr_revert()
- Cancel a QR payment
Currency Support
The SDK supports multiple currencies through the Currency
class:
Currency::Guarani
- Paraguayan Guarani (PYG)Currency::Dollar
- US Dollar (USD)
For detailed API documentation, visit:
Contributing
Contributions are welcome! If you find any issues or would like to add new features or improvements, please feel free to submit a pull request.
Contributors
Security Vulnerabilities
If you encounter any security-related issues, please feel free to raise a ticket on the issue tracker.
License
This library is open-source software licensed under the MIT License. Please see the License File for more information.