PHP code example of danielsmelo / pagarme

1. Go to this page and download the library: Download danielsmelo/pagarme 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/ */

    

danielsmelo / pagarme example snippets


return [
    'api_key'     => 'sua_api_key',
    'base_url'    => 'https://api.pagar.me/core',
    'api_version' => 'v5',
];

Pagarme::client()->create(array $data)

Pagarme::client()->find(string $id)

Pagarme::client()->update(string $id, array $data)

Pagarme::client()->all()

Pagarme::client()->createCreditCard(string $id, array $data)

Pagarme::client()->findCreditCard(string $id, string $cardId)

Pagarme::client()->allCreditCards(string $id)

Pagarme::client()->updateCreditCard(string $id, $cardId, array $data)

Pagarme::client()->deleteCreditCard(string $id, string $cardId)

Pagarme::client()->renewCreditCard(string $id, string $cardId)

Pagarme::client()->createAddress(string $id, array $data)

Pagarme::client()->findAddress(string $id, string $addressId)

Pagarme::client()->allAddresses(string $id)

Pagarme::client()->updateAddress(string $id, $addressId, array $data)

Pagarme::client()->deleteAddress(string $id, string $addressId)

Pagarme:charge()->capture(string $id, array $data)

Pagarme:charge()->create(array $data)

Pagarme:charge()->find(string $id)

Pagarme:charge()->editCard(string $id, array $data)

Pagarme:charge()->dueDate(string $id, array $data)

Pagarme:charge()->updatePaymentMethod(string $id, array $data)

Pagarme:charge()->cancel(string $id)

Pagarme:charge()->all()

Pagarme:charge()->retry(string $id)

Pagarme:charge()->confirmCash(string $id, array $data)

Pagarme:order()->create(array $data)

Pagarme:order()->find(string $id)

Pagarme:order()->close(string $id)

Pagarme:order()->all()

Pagarme:order()->addItem(string $id, array $data)

Pagarme:order()->updateItem(string $id, string $itemId, array $data)

Pagarme:order()->deleteItem(string $id, string $itemId)

Pagarme:order()->deleteAllItems(string $id)

Pagarme:order()->allItems(string $id)

Pagarme:recipent()->create(array $data)

Pagarme:recipent()->find(string $id)

Pagarme:recipent()->update(string $id, array $data)

Pagarme:recipent()->all()
bash
php artisan vendor:publish --tag="pagarme-config"