sairoko12 / conekta-php-namespaces
Conekta PHP Library
Requires
- php: >=5.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- dev-master
- v3.0.0
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.9.9
- v1.9.8
- 1.9.7
- v1.9.6
- v1.9.5
- v1.9.4
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- dev-feature/changelog-update
- dev-feature/upgrade-1.1
- dev-feature/exceptions-fix
- dev-feature/version-bump
- dev-feature/error-list-refactor
- dev-fix/contextual-data-change
- dev-feature/change-contextual-date-attr
- dev-dev
This package is not auto-updated.
Last update: 2025-01-13 13:12:58 UTC
README
Conekta PHP v.3.0.0
This is a php library that allows interaction with https://api.conekta.io API.
Installation
Obtain the latest version of the Conekta PHP bindings with:
git clone https://github.com/conekta/conekta-php
To get started, add the following to your PHP script:
require_once("/path/to/conekta-php/lib/Conekta.php");
You can also install this library with composer:
require: "conekta/conekta-php": "3.0.0"
Usage
\Conekta\Conekta::setApiKey('1tv5yJp3xnVZ7eK67m4h'); try { $charge = \Conekta\Charge::create(array( "amount"=> 51000, "currency"=> "MXN", "description"=> "Pizza Delivery", "reference_id"=> "orden_de_id_interno", "card"=> $_POST['conektaTokenId'] //"tok_a4Ff0dD2xYZZq82d9" )); } catch (Conekta_Error $e) { echo $e->getMessage(); //Dev Message echo $e->message_to_purchaser; //El pago no pudo ser procesado } { "id": "5286828b8ee31e64b7001739", "livemode": false, "created_at": 1384546955, "status": "paid", "currency": "MXN", "description": "Some desc", "reference_id": null, "failure_code": null, "failure_message": null, "object": "charge", "amount": 2000, "fee": 371, "payment_method": { "name": "Mario Moreno", "exp_month": "05", "exp_year": "15", "auth_code": "861491", "object": "card_payment", "last4": "4242", "brand": "visa" }, "details": { "name": null, "phone": null, "email": null, "line_items": [] } }
Documentation
Please see https://www.conekta.io/docs/api for up-to-date documentation.
Tests
In order to run tests you have to install SimpleTest (https://github.com/simpletest/simpletest) via Composer (http://getcomposer.org/) (recommended way):
composer.phar update --dev
Run test suite:
php ./test/Conekta.php
License
Developed by Conekta. Available with MIT License.
We are hiring
If you are a comfortable working with a range of backend languages (Java, Python, Ruby, PHP, etc) and frameworks, you have solid foundation in data structures, algorithms and software design with strong analytical and debugging skills. Send your CV, github to quieroser@conekta.io