PHP code example of lucasamauri / moip-subscriptions-php
1. Go to this page and download the library: Download lucasamauri/moip-subscriptions-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lucasamauri / moip-subscriptions-php example snippets
use Moip\Moip;
$token = '01010101010101010101010101010101';
$key = 'ABABABABABABABABABABABABABABABABABABABAB';
$moip = new Moip($token, $key, Moip::ENDPOINT_SANDBOX);
// Create a plan
$plan = $moip->plan()
->setCode("P99")
->setName("R$99")
->setDescription("Plano R$99")
->setAmount(99.00)
->create();
// List Plans
$moip->plan()->getList();