doskyft/helloasso-php
最新稳定版本:v1.2.0
Composer 安装命令:
composer require doskyft/helloasso-php
包简介
Helloasso PHP Library
README 文档
README
Un sdk pour utiliser l'api d'helloasso
Installation
composer require doskyft/helloasso-php
Utilisation
Pour commencer, il faut créer une instance de HelloassoClient.
use Helloasso\HelloassoClientFactory; $helloassoClient = HelloassoClientFactory::create( 'hello_asso_id', 'hello_asso_secret', 'hello_asso_organization_slug', true # sandbox );
Maintenant, on peut commencer à utiliser le client
CheckoutIntent
Créer un CheckoutIntent
use Helloasso\Models\Carts\CheckoutPayer; use Helloasso\Models\Carts\InitCheckoutBody; $checkoutIntent = (new InitCheckoutBody()) ->setTotalAmount(1000) ->setInitialAmount(1000) ->setItemName('Un produit') ->setBackUrl('https://localhost/back') ->setErrorUrl('https://localhost/error') ->setReturnUrl('https://localhost/return') ->setPayer((new CheckoutPayer()) ->setFirstName() ->setLastName() ->setEmail() ) ->setMetadata([ '' => '', ]) ; $helloassoClient->checkout->create($checkoutIntent);
Order
Évènements
use Helloasso\Models\Event; $event = $helloassoClient->decodeEvent($rawEventReceivedFromHelloasso); // Returns an instance of Event
Contribuer
Ce projet inclut des tests fonctionnels qui nécessitent un accès à la sandbox d'Helloasso.
Pour lancer les tests :
HELLOASSO_CLIENT_ID=[YourClientId] HELLOASSO_CLIENT_SECRET=[YourClientSecret] HELLOASSO_ORGANISATION=[YourOrganisation] vendor/bin/phpunit
Contributeurs
|
Damien Hebert |
Olivier Dolbeau |
统计信息
- 总下载量: 2.8k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-06