jenn0pal / paymongo-php
A PHP wrapper for paymongo
dev-master
2022-04-19 07:34 UTC
Requires
- ext-json: *
- guzzlehttp/guzzle: ^7.2
Requires (Dev)
- phpunit/phpunit: ^8.5
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2024-05-19 11:59:41 UTC
README
This a framework agnostic PHP wrapper for accessing Paymongo API.
Installation
composer require jenn0pal/paymongo-php:dev-master
Usage
For payload, please refer to Paymongo API reference
use jenn0pal\Paymongo\Paymongo; $config = [ 'secret_key' => 'YOUR-SECRET-KEY' ]; $payload = [ 'data' => [ 'attributes' => [ 'amount' => 10000, 'payment_method_allowed' => ['card'], 'payment_method_options' => [ 'card' => ['request_three_d_secure'] ], 'description' => 'A payment intent', 'statement_descriptor' => 'MyStore', 'currency' => 'PHP', 'metadata' => [] ] ] ]; $paymentIntent = Paymongo::payment($config)->create($payload);