Skip to content

Commit

Permalink
Merge pull request #9 from paynl/feature/PLUG-1680
Browse files Browse the repository at this point in the history
PLUG-1680 - merchant::addCLearing code-example added to README.md
  • Loading branch information
woutse authored Jan 27, 2023
2 parents b5c5778 + 2954fdc commit 134e96d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- [9. Disable a payment method](#9-disable-a-payment-method)
- [10. Get statistics of your submerchants](#10-get-statistics-of-your-submerchants)
- [11. Creating an invoice for a merchant](#11-creating-an-invoice-for-a-merchant)
- [12. Creating a clearing for a merchant](#12-creating-an-clearing-for-a-merchant)

---

Expand Down Expand Up @@ -292,3 +293,24 @@ $result = Paynl\Alliance\Invoice::add(array(

$referenceId = $result->referenceId();
```

##### 12. Creating a clearing for a merchant
You can add a clearing for a merchant.
The addClearing function should be called after 5:00 am CET, as the daily totals of the clearings are calculated at 4:00 am CET each day.
See the following [example](https://github.com/paynl/sdk-alliance/blob/master/samples/addClearing.php)

```php
\Paynl\Config::setServiceId('SL-####-####');

$result = \Paynl\Alliance\Merchant::addClearing(array(

# Required
'amount' => '123', # The amount to clear, in cents.

# Optional
'merchantId' => 'M-1234-5678', # The id of the merchant
'contentCategoryId' => '1234-5678' # The content category Id
));

$referenceId = $result->referenceId();
```

0 comments on commit 134e96d

Please sign in to comment.