Skip to content

Commit 900ff3d

Browse files
committed
PHPAY-52: wip: fix webhooks example
1 parent f1c88eb commit 900ff3d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/asaas/webhook.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use PHPay\Gateways\Asaas\AsaasGateway;
3+
use PHPay\Asaas\AsaasGateway;
44
use PHPay\PHPay;
55

66
require_once __DIR__ . '/../../vendor/autoload.php';
@@ -44,7 +44,7 @@
4444
* @return array
4545
* @see available fields in https://docs.asaas.com/reference/criar-novo-webhook
4646
*/
47-
$webhook = $phpay
47+
$phpay
4848
->webhook($webhook)
4949
->create();
5050

@@ -64,18 +64,18 @@
6464
*/
6565
$phpay
6666
->webhook()
67-
->find($webhook['id']);
67+
->find($webhookId);
6868

6969
/**
7070
* update a webhook
7171
*
7272
* @return array
7373
* @see available fields in https://docs.asaas.com/reference/atualizar-webhook-existente
7474
*/
75-
$webhookUpdated = $phpay
75+
$phpay
7676
->webhook()
77-
->update($webhook['id'], [
78-
'name' => 'Webhook de Teste Atualizado',
77+
->update($webhookId, [
78+
'name' => 'Update webhook with PHPay is awesome',
7979
'url' => 'https://sixtec.com.br/webhook/atualizado',
8080
]);
8181

@@ -84,6 +84,6 @@
8484
*
8585
* @return bool
8686
*/
87-
$webhookDeleted = $phpay
87+
$phpay
8888
->webhook()
89-
->destroy($webhook['id']);
89+
->destroy($webhookId);

0 commit comments

Comments
 (0)