Skip to content

Commit

Permalink
Added named webhook route to examples. Fixes #52
Browse files Browse the repository at this point in the history
  • Loading branch information
sandervanhooft committed Jul 9, 2018
1 parent 031f439 commit 307f329
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $payment = Mollie::api()->payments()->create([
'value' => '10.00', // You must send the correct number of decimals, thus we enforce the use of strings
],
"description" => "My first API payment",
"redirectUrl" => "https://webshop.example.org/order/12345/",
'webhookUrl' => route('webhooks.mollie'),
]);

$payment = Mollie::api()->payments()->get($payment->id);
Expand Down
2 changes: 2 additions & 0 deletions docs/recurring_and_direct_charge.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ $payment = Mollie::api()->payments()->create([
'sequenceType' => 'first',
'description' => 'My Initial Payment',
'redirectUrl' => 'https://domain.com/return',
'webhookUrl' => route('webhooks.mollie'),
]);
```

Expand All @@ -52,6 +53,7 @@ If any of the mandates is valid, charging the user is a piece of cake. Make sure
'customerId' => $customer->id,
'sequenceType' => 'recurring',
'description' => 'Direct Charge',
'webhookUrl' => route('webhooks.mollie'),
]);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $payment = Mollie::api()->payments()->create([
],
"description" => "My first API payment",
"redirectUrl" => "https://webshop.example.org/order/12345/",
'webhookUrl' => 'https://domain.com/webhooks/mollie',
'webhookUrl' => route('webhooks.mollie'),
]);
```

Expand Down

0 comments on commit 307f329

Please sign in to comment.