Skip to content

Commit

Permalink
add fullpath of PaymillException to catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoloff committed Jan 27, 2015
1 parent 8aae3f6 commit a70be3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $request = new Paymill\Request($apiKey);
1. Instantiate the model class with the parameters described in the API-reference:

```php
$payment = new Paymill\Models\Request\Payment();
$payment = new \Paymill\Models\Request\Payment();
$payment->setToken("098f6bcd4621d373cade4e832627b4f6");
```

Expand All @@ -73,10 +73,10 @@ $paymentId = $response->getId();
It recommend to wrap it into a "try/catch" to handle exceptions like this:

```php
try{
try {
$response = $request->create($payment);
$paymentId = $response->getId();
}catch(PaymillException $e){
} catch(\Paymill\Services\PaymillException $e){
//Do something with the error informations below
$e->getResponseCode();
$e->getStatusCode();
Expand Down

0 comments on commit a70be3a

Please sign in to comment.