forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use Apoloz\AlfaBank\AlfaBank;
|
||||
use Apoloz\AlfaBank\Webhooks\WebhookFactory;
|
||||
use Apoloz\AlfaBank\Requests\Webhooks\GetWebhooksRequest;
|
||||
use Apoloz\AlfaBank\Requests\Webhooks\CreateWebhookRequest;
|
||||
use Apoloz\AlfaBank\Data\Webhooks\Subscriptions\WebhookSubscriptionRequestData;
|
||||
use Apoloz\AlfaBank\Requests\Webhooks\CreateWebhookRequest;
|
||||
use Apoloz\AlfaBank\Requests\Webhooks\GetWebhooksRequest;
|
||||
use Apoloz\AlfaBank\Webhooks\WebhookFactory;
|
||||
|
||||
/**
|
||||
* 1. Managing Webhooks (BaaS API)
|
||||
@@ -15,7 +15,7 @@ $baas = AlfaBank::baas('cert.pem', 'key.pem');
|
||||
$baas->login('id', 'secret');
|
||||
|
||||
// List existing webhooks
|
||||
$response = $baas->send(new GetWebhooksRequest());
|
||||
$response = $baas->send(new GetWebhooksRequest);
|
||||
$webhooks = $response->dto(); // DataCollection of WebhookSubscriptionData
|
||||
|
||||
foreach ($webhooks as $webhook) {
|
||||
@@ -38,9 +38,9 @@ $rawPayload = [
|
||||
'transactionId' => 'TX-12345',
|
||||
'amount' => ['amount' => 100.50, 'currencyName' => 'RUR'],
|
||||
'direction' => 'CREDIT',
|
||||
'paymentPurpose' => 'Test payment'
|
||||
]
|
||||
]
|
||||
'paymentPurpose' => 'Test payment',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// Use the factory to parse the payload into a DTO
|
||||
|
||||
Reference in New Issue
Block a user