定制 paysera/lib-event-notification-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

paysera/lib-event-notification-client

最新稳定版本:1.0.0

Composer 安装命令:

composer require paysera/lib-event-notification-client

包简介

PHP REST Client for Paysera event notifications

README 文档

README

Provides methods to manipulate EventNotification API. It automatically authenticates all requests and maps required data structure for you.

Usage

This library provides ClientFactory class, which you should use to get the API client itself:

use Paysera\Client\EventNotificationClient\ClientFactory;

$clientFactory = ClientFactory::create([
    'base_url' => 'https://checkout-eu-a.paysera.com/notification/rest/v1/', // optional, in case you need a custom one.
    'basic' => [                                        // use this, it API requires Basic authentication.
        'username' => 'username',
        'password' => 'password',
    ],
    'oauth' => [                                        // use this, it API requires OAuth v2 authentication.
        'token' => [
            'access_token' => 'my-access-token',
            'refresh_token' => 'my-refresh-token',
        ],
    ],
    // other configuration options, if needed
]);

$eventNotificationClient = $clientFactory->getEventNotificationClient();

Please use only one authentication mechanism, provided by Vendor.

Now, that you have instance of EventNotificationClient, you can use following methods

Methods

Mark(read) notification as processed

$result = $eventNotificationClient->readNotification($notificationId);

Get notification with resolved data

$result = $eventNotificationClient->getNotification($notificationId);

Get filtered notifications with resolved data

use Paysera\Client\EventNotificationClient\Entity as Entities;

$notificationFilter = new Entities\NotificationFilter();

$notificationFilter->setStatus($status);
    
$result = $eventNotificationClient->getNotifications($notificationFilter);

统计信息

  • 总下载量: 19.1k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-07-24