Skip to content

Commit

Permalink
modified readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaiturravaldes committed May 2, 2021
1 parent 521d882 commit fb752f7
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,32 @@
## Install
Install package via composer

composer require endpay/endpay-sdk
```cli
composer require endpay/endpay-sdk
```

## Use
TODO...

use Endpay\Endpay;
### Instance and set configurations
```php
use Endpay\Endpay;

$endpay = new Endpay();
$endpay = new Endpay();

$endpay->setCommerceId('commerceId');
$endpay->setApiKey('apiKey');
$endpay->setCommerceId('commerceId');
$endpay->setApiKey('apiKey');
```

### Create a payment
```php
$payment = $endpay->payments()->create([
'subject' => 'Prueba desde SDK PHP',
'amount' => 1
]);
```


### Read a payment
```php
$paymentData = $endpay->payments()->read($payment['id']);
```

0 comments on commit fb752f7

Please sign in to comment.