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
Library to implement Bancard vPOS and Bancard VentasQR products.
Installation
Dependencies
- PHP >= 8.0
Through composer
Usage
To set your Bancard credentials, use the Bancard::credentials()
method.
The library by defaults uses the staging
environment. To change to production
environment use the Bancard::useProduction()
method.
This method also can receive a boolean parameter. For example, in Laravel you can dynamically match your environment
Request and Response objects features
The request and the response objects have some helper methods:
vPOS
- Single Buy
- Single Buy Zimple
- Cards New
- User Cards
- Card Delete
- Charge
- Confirmation
- Preauthorization Confirm
- Rollback
SingleBuy
Endpoint used to generate a process ID to call the Bancard <iframe>
for an one-time payment.
SingleBuy Zimple
Same as above, but for Zimple
payments.
Customizable requests
If you need, you can create a pending request and change the values on runtime. This applies to all available requests.
CardsNew
Endpoint used to generate a process ID to call the Bancard <iframe>
for card registry.
UsersCards
Endpoint used to get the registered user cards.
CardDelete
Endpoint to remove a registered card. You need an instance of Card
model obtained from previous request.
Charge
Endpoint used to make a payment using a registered user card. You need an instance of Card
model obtained from Bancard::users_cards()
.
Confirmation
Endpoint to get the confirmation of a payment. Example, in case the above charge request stayed as a pending of confirmation payment.
Rollback
Endpoint to rollback a payment.
VentasQR
- QR Generate
- QR Revert
Commerce code & Branch code
In order to use VentasQR, you need to set your credentials through the Bancard::qr_credentials()
method.
⚠ Important: VentasQR is not scoped by Bancard::useProduction()
, since your assigned domain will define your testing/production environment.
QR Generate
Endpoint to request a QR Payment.
QR Revert
Endpoint to revert a QR Payment.
Security Vulnerabilities
If you encounter any security-related issues, please feel free to raise a ticket on the issue tracker.
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
Licence
This library is open-source software licensed under the GPL-3.0 License. Please see the License File for more information.