-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Mutualize services
Showing
18 changed files
with
706 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Helloasso; | ||
|
||
use Helloasso\Http\ApiCaller; | ||
use Helloasso\Http\ResponseHandler; | ||
use Helloasso\Http\TokenManager; | ||
use Symfony\Component\HttpClient\HttpClient; | ||
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; | ||
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; | ||
use Symfony\Component\PropertyInfo\PropertyInfoExtractor; | ||
use Symfony\Component\Serializer\Encoder\JsonEncoder; | ||
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; | ||
use Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer; | ||
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; | ||
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; | ||
use Symfony\Component\Serializer\Serializer; | ||
|
||
class HelloassoClientFactory | ||
{ | ||
public static function create( | ||
string $clientId, | ||
string $clientSecret, | ||
string $organizationSlug, | ||
bool $sandbox = false, | ||
): HelloassoClient { | ||
$httpClient = HttpClient::createForBaseUri($sandbox ? 'https://api.helloasso-sandbox.com' : 'https://api.helloasso.com', [ | ||
'headers' => [ | ||
'accept' => 'application/json', | ||
'Content-type: application/json', | ||
], | ||
]); | ||
$serializer = self::createSerializer(); | ||
$responseHandler = new ResponseHandler($serializer); | ||
$tokenManager = new TokenManager($httpClient, $responseHandler, $clientId, $clientSecret); | ||
|
||
return new HelloassoClient( | ||
$serializer, | ||
new ApiCaller($httpClient, $tokenManager, $responseHandler, $serializer), | ||
$organizationSlug, | ||
); | ||
} | ||
|
||
private static function createSerializer(): Serializer | ||
{ | ||
$encoder = [new JsonEncoder()]; | ||
$extractor = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]); | ||
$normalizer = [ | ||
new DateTimeNormalizer(), | ||
new BackedEnumNormalizer(), | ||
new ArrayDenormalizer(), | ||
new ObjectNormalizer(null, null, null, $extractor), | ||
]; | ||
|
||
return new Serializer($normalizer, $encoder); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Helloasso\Http; | ||
|
||
use Helloasso\Models\HelloassoObject; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\Serializer\Serializer; | ||
use Symfony\Contracts\HttpClient\HttpClientInterface; | ||
|
||
class ApiCaller | ||
{ | ||
public function __construct( | ||
private readonly HttpClientInterface $httpClient, | ||
private readonly TokenManager $tokenManager, | ||
private readonly ResponseHandler $responseHandler, | ||
private readonly Serializer $serializer, | ||
) { | ||
} | ||
|
||
/** | ||
* @template T of HelloassoObject | ||
* | ||
* @param class-string<T> $responseClassType | ||
* | ||
* @return T | ||
*/ | ||
public function post(string $url, array|HelloassoObject|null $body, string $responseClassType): HelloassoObject | ||
{ | ||
$response = $this->httpClient->request(Request::METHOD_POST, $url, [ | ||
'auth_bearer' => $this->tokenManager->getAccessToken(), | ||
'body' => $this->serializer->serialize($body, 'json'), | ||
]); | ||
|
||
return $this->responseHandler->deserializeResponse($response, $responseClassType); | ||
} | ||
|
||
/** | ||
* @template T of HelloassoObject | ||
* | ||
* @param class-string<T> $responseClassType | ||
* | ||
* @return T | ||
*/ | ||
public function get(string $url, string $responseClassType): HelloassoObject | ||
{ | ||
$response = $this->httpClient->request(Request::METHOD_GET, $url, [ | ||
'auth_bearer' => $this->tokenManager->getAccessToken(), | ||
]); | ||
|
||
return $this->responseHandler->deserializeResponse($response, $responseClassType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Helloasso\Http; | ||
|
||
use Helloasso\Exception\HelloassoApiException; | ||
use Helloasso\Models\HelloassoObject; | ||
use Symfony\Component\Serializer\Serializer; | ||
use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; | ||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; | ||
use Symfony\Contracts\HttpClient\ResponseInterface; | ||
|
||
class ResponseHandler | ||
{ | ||
public function __construct( | ||
private readonly Serializer $serializer, | ||
) { | ||
} | ||
|
||
/** | ||
* @template T of HelloassoObject | ||
* | ||
* @param class-string<T> $responseClassType | ||
* | ||
* @return T | ||
* | ||
* @throws HelloassoApiException | ||
*/ | ||
public function deserializeResponse(ResponseInterface $response, string $responseClassType): HelloassoObject | ||
{ | ||
try { | ||
$responseContent = $response->getContent(); | ||
} catch (HttpExceptionInterface|TransportExceptionInterface $e) { | ||
try { | ||
$content = $response->getContent(false); | ||
} catch (HttpExceptionInterface|TransportExceptionInterface $e) { | ||
$content = 'unknown error'; | ||
} | ||
|
||
throw new HelloassoApiException($e->getMessage().' : '.$content); | ||
} | ||
|
||
return $this->deserializeResponseContent($responseContent, $responseClassType); | ||
} | ||
|
||
/** | ||
* @template T of HelloassoObject | ||
* | ||
* @param class-string<T> $responseClassType | ||
* | ||
* @return T | ||
*/ | ||
public function deserializeResponseContent(string $content, string $responseClassType): HelloassoObject | ||
{ | ||
return $this->serializer->deserialize($content, $responseClassType, 'json'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Helloasso\Http; | ||
|
||
use Helloasso\Models\ClientCredentials; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Contracts\HttpClient\HttpClientInterface; | ||
|
||
class TokenManager | ||
{ | ||
private ?string $accessToken = null; | ||
|
||
public function __construct( | ||
private readonly HttpClientInterface $httpClient, | ||
private readonly ResponseHandler $responseHandler, | ||
private readonly string $clientId, | ||
private readonly string $clientSecret, | ||
) { | ||
} | ||
|
||
public function getAccessToken(): string | ||
{ | ||
if (null === $this->accessToken) { | ||
$this->retrieveAccessToken(); | ||
} | ||
|
||
return $this->accessToken; | ||
} | ||
|
||
private function retrieveAccessToken(): void | ||
{ | ||
$response = $this->httpClient->request(Request::METHOD_POST, '/oauth2/token', [ | ||
'body' => [ | ||
'grant_type' => 'client_credentials', | ||
'client_id' => $this->clientId, | ||
'client_secret' => $this->clientSecret, | ||
], | ||
'headers' => [ | ||
'Content-Type: application/x-www-form-urlencoded', | ||
], | ||
]); | ||
|
||
$credentials = $this->responseHandler->deserializeResponse($response, ClientCredentials::class); | ||
|
||
$this->accessToken = $credentials->getAccessToken(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ | |
|
||
namespace Helloasso\Service; | ||
|
||
class DirectoryService extends ApiRequest | ||
class DirectoryService | ||
{ | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Helloasso\Tests\Functional; | ||
|
||
use Helloasso\HelloassoClient; | ||
use Helloasso\HelloassoClientFactory; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
abstract class FunctionalTestCase extends TestCase | ||
{ | ||
protected function getClient(): HelloassoClient | ||
{ | ||
$clientId = getenv('HELLOASSO_CLIENT_ID'); | ||
$clientSecret = getenv('HELLOASSO_CLIENT_SECRET'); | ||
$organisationSlug = getenv('HELLOASSO_ORGANISATION') ? getenv('HELLOASSO_ORGANISATION_SLUG') : 'helloasso-php-sdk'; | ||
|
||
if (empty($clientId) || empty($clientSecret)) { | ||
throw new \RuntimeException('Some mandatory environment variables ("HELLOASSO_CLIENT_ID", "HELLOASSO_CLIENT_SECRET") have not been set (or incorrectly set). Please consider creating an account on https://www.helloasso-sandbox.com/ and run tests using HELLOASSO_CLIENT_ID=[YourClientId] HELLOASSO_CLIENT_SECRET=[YourClientSecret] HELLOASSO_ORGANISATION_SLUG=[YourOrganisation] vendor/bin/phpunit'); | ||
} | ||
|
||
return HelloassoClientFactory::create($clientId, $clientSecret, $organisationSlug, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Helloasso\Tests\Functional; | ||
|
||
use Helloasso\Models\Event; | ||
use Helloasso\Models\Forms\FormPublicModel; | ||
use Helloasso\Models\Statistics\OrderDetail; | ||
use Helloasso\Models\Statistics\PaymentDetail; | ||
|
||
final class HelloAssoClientTest extends FunctionalTestCase | ||
{ | ||
public function testDecodeOrderEvent(): void | ||
{ | ||
$event = $this->getClient()->decodeEvent(file_get_contents(__DIR__.'/../fixtures/event.Order.json')); | ||
|
||
$this->assertInstanceOf(Event::class, $event); | ||
$this->assertSame('Order', $event->getEventType()); | ||
$this->assertInstanceOf(OrderDetail::class, $event->getData()); | ||
} | ||
|
||
public function testDecodePaymentEvent(): void | ||
{ | ||
$event = $this->getClient()->decodeEvent(file_get_contents(__DIR__.'/../fixtures/event.Payment.json')); | ||
|
||
$this->assertInstanceOf(Event::class, $event); | ||
$this->assertSame('Payment', $event->getEventType()); | ||
$this->assertInstanceOf(PaymentDetail::class, $event->getData()); | ||
} | ||
|
||
public function testDecodeFormEvent(): void | ||
{ | ||
$event = $this->getClient()->decodeEvent(file_get_contents(__DIR__.'/../fixtures/event.Form.json')); | ||
|
||
$this->assertInstanceOf(Event::class, $event); | ||
$this->assertSame('Form', $event->getEventType()); | ||
$this->assertInstanceOf(FormPublicModel::class, $event->getData()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"data": { | ||
"organizationLogo": "https://cdn.helloasso.com/img/logos/association logo example.jpg", | ||
"organizationName": "Association Exemple", | ||
"tiers": [ | ||
{ | ||
"id": 1, | ||
"label": "mon tarif 1", | ||
"description": "description 1", | ||
"tierType": "Registration", | ||
"price": 1000, | ||
"vatRate": 0, | ||
"paymentFrequency": "Single", | ||
"maxPerUser": 5, | ||
"isEligibleTaxReceipt": true | ||
}, | ||
{ | ||
"id": 2, | ||
"label": "mon tarif 2", | ||
"description": "description 2", | ||
"tierType": "Registration", | ||
"price": 1000, | ||
"vatRate": 0, | ||
"paymentFrequency": "Single", | ||
"maxPerUser": 5, | ||
"isEligibleTaxReceipt": true | ||
}, | ||
{ | ||
"id": 3, | ||
"label": "mon tarif 3", | ||
"description": "description 3", | ||
"tierType": "Registration", | ||
"price": 1000, | ||
"vatRate": 0, | ||
"paymentFrequency": "Single", | ||
"maxPerUser": 5, | ||
"isEligibleTaxReceipt": true | ||
}, | ||
{ | ||
"id": 4, | ||
"label": "mon tarif 4", | ||
"description": "description 4", | ||
"tierType": "Registration", | ||
"price": 1000, | ||
"vatRate": 0, | ||
"paymentFrequency": "Single", | ||
"maxPerUser": 5, | ||
"isEligibleTaxReceipt": true | ||
}, | ||
{ | ||
"id": 5, | ||
"label": "mon tarif 5", | ||
"description": "description 5", | ||
"tierType": "Registration", | ||
"price": 1000, | ||
"vatRate": 0, | ||
"paymentFrequency": "Single", | ||
"maxPerUser": 5, | ||
"isEligibleTaxReceipt": true | ||
} | ||
], | ||
"activityType": "ActivityType", | ||
"activityTypeId": 12, | ||
"place": { | ||
"address": "23 rue du palmier", | ||
"name": "Café du théatre", | ||
"city": "Paris", | ||
"zipCode": "75000", | ||
"country": "FRA", | ||
"geoLocation": { | ||
"latitude": 22.56, | ||
"longitude": 44.87 | ||
} | ||
}, | ||
"saleEndDate": "2024-04-06T23:12:53.5983212+02:00", | ||
"saleStartDate": "2024-04-02T23:12:53.5983212+02:00", | ||
"banner": { | ||
"fileName": "thumbnail 1", | ||
"publicUrl": "https://cdn.helloasso.com/img/photos/evenements/thumbnail 1" | ||
}, | ||
"currency": "EUR", | ||
"description": "Description de mon événement", | ||
"startDate": "2024-04-04T23:05:53.5983212+02:00", | ||
"endDate": "2024-04-11T23:12:53.5983212+02:00", | ||
"logo": { | ||
"fileName": "image 1", | ||
"publicUrl": "https://cdn.helloasso.com/img/photos/evenements/image 1" | ||
}, | ||
"meta": { | ||
"createdAt": "2024-04-04T22:57:53.5983212+02:00", | ||
"updatedAt": "2024-04-04T22:57:53.5983212+02:00" | ||
}, | ||
"state": "Public", | ||
"title": "Nom de mon événement", | ||
"widgetButtonUrl": "https://www.helloasso.com/associations/association-exemple/evenements/formulaire-exemple/widget-bouton", | ||
"widgetFullUrl": "https://www.helloasso.com/associations/association-exemple/evenements/formulaire-exemple/widget", | ||
"widgetVignetteHorizontalUrl": "https://www.helloasso.com/associations/association-exemple/evenements/formulaire-exemple/widget-vignette-horizontale", | ||
"widgetVignetteVerticalUrl": "https://www.helloasso.com/associations/association-exemple/evenements/formulaire-exemple/widget-vignette", | ||
"formSlug": "formulaire-exemple", | ||
"formType": "Event", | ||
"url": "https://www.helloasso.com/associations/association-exemple/evenements/formulaire-exemple", | ||
"organizationSlug": "association-exemple" | ||
}, | ||
"eventType": "Form" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"data": { | ||
"order": { | ||
"id": 12578, | ||
"date": "2019-12-15T17:27:02+01:00", | ||
"formSlug": "formulaire-exemple", | ||
"formType": "Event", | ||
"organizationName": "name", | ||
"organizationSlug": "association-exemple", | ||
"organizationType": "Association1901", | ||
"organizationIsUnderColucheLaw": false, | ||
"formName": "name", | ||
"meta": { | ||
"createdAt": "2019-12-15T17:27:02+01:00", | ||
"updatedAt": "2019-12-15T17:27:02+01:00" | ||
}, | ||
"isAnonymous": false, | ||
"isAmountHidden": false | ||
}, | ||
"payer": { | ||
"email": "john.doe@test.com", | ||
"address": "23 rue du palmier", | ||
"city": "Paris", | ||
"zipCode": "75000", | ||
"country": "FRA", | ||
"company": "Hello Asso", | ||
"dateOfBirth": "1986-07-06T00:00:00+02:00", | ||
"firstName": "John", | ||
"lastName": "Doe" | ||
}, | ||
"payments": [ | ||
{ | ||
"cashOutState": "CashedOut", | ||
"shareAmount": 10000, | ||
"id": 159875, | ||
"amount": 11000, | ||
"date": "2019-12-15T17:27:02+01:00", | ||
"paymentMeans": "Card", | ||
"installmentNumber": 1, | ||
"state": "Authorized", | ||
"meta": { | ||
"createdAt": "2019-12-15T17:27:02+01:00", | ||
"updatedAt": "2019-12-15T17:27:02+01:00" | ||
} | ||
}, | ||
{ | ||
"cashOutState": "Transfered", | ||
"shareAmount": 30000, | ||
"id": 159876, | ||
"amount": 9000, | ||
"date": "2020-01-15T17:27:02+01:00", | ||
"paymentMeans": "Card", | ||
"installmentNumber": 2, | ||
"state": "Authorized", | ||
"meta": { | ||
"createdAt": "2020-01-15T17:27:02+01:00", | ||
"updatedAt": "2020-01-15T17:27:02+01:00" | ||
} | ||
}, | ||
{ | ||
"shareAmount": 30000, | ||
"id": 159877, | ||
"amount": 9000, | ||
"date": "2020-02-15T17:27:02+01:00", | ||
"paymentMeans": "Card", | ||
"installmentNumber": 3, | ||
"state": "Pending", | ||
"meta": { | ||
"createdAt": "2020-02-15T17:27:02+01:00", | ||
"updatedAt": "2020-02-15T17:27:02+01:00" | ||
}, | ||
"refundOperations": [ | ||
{ | ||
"id": 1, | ||
"amount": 2000, | ||
"amountTip": 200, | ||
"status": "PROCESSED", | ||
"meta": { | ||
"createdAt": "2024-04-02T10:16:24.0205634+02:00", | ||
"updatedAt": "2024-04-03T10:16:24.0205634+02:00" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"name": "Adhesion Football", | ||
"user": { | ||
"firstName": "John", | ||
"lastName": "Doe" | ||
}, | ||
"priceCategory": "Fixed", | ||
"discount": { | ||
"code": "DISC30 : -30€", | ||
"amount": 3000 | ||
}, | ||
"customFields": [ | ||
{ | ||
"id": 0, | ||
"name": "BirthDate", | ||
"type": "Date", | ||
"answer": "1978-09-15" | ||
}, | ||
{ | ||
"id": 0, | ||
"name": "ZipCode", | ||
"type": "Zipcode", | ||
"answer": "33600" | ||
} | ||
], | ||
"options": [ | ||
{ | ||
"name": "T-Shirt", | ||
"amount": 700, | ||
"priceCategory": "Fixed", | ||
"isRequired": false, | ||
"customFields": [ | ||
{ | ||
"id": 0, | ||
"name": "Couleur", | ||
"type": "ChoiceList", | ||
"answer": "Bleue" | ||
} | ||
], | ||
"optionId": 12581 | ||
}, | ||
{ | ||
"name": "Casquette", | ||
"amount": 300, | ||
"priceCategory": "Fixed", | ||
"isRequired": false, | ||
"optionId": 12580 | ||
} | ||
], | ||
"qrCode": "MTI1Nzg6NjM3MTIwMjQwMjIwMDAwMDAw", | ||
"tierDescription": "tierDescription", | ||
"tierId": 168965, | ||
"comment": "comment", | ||
"id": 12578, | ||
"amount": 30000, | ||
"type": "Membership", | ||
"initialAmount": 30000, | ||
"state": "Processed" | ||
}, | ||
"eventType": "Order" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"data": { | ||
"order": { | ||
"id": 12578, | ||
"date": "2019-12-15T17:27:02+01:00", | ||
"formSlug": "formulaire-exemple", | ||
"formType": "Event", | ||
"organizationName": "name", | ||
"organizationSlug": "association-exemple", | ||
"organizationType": "Association1901", | ||
"organizationIsUnderColucheLaw": false, | ||
"formName": "name", | ||
"meta": { | ||
"createdAt": "2019-12-15T17:27:02+01:00", | ||
"updatedAt": "2019-12-15T17:27:02+01:00" | ||
}, | ||
"isAnonymous": false, | ||
"isAmountHidden": false | ||
}, | ||
"payer": { | ||
"email": "john.doe@test.com", | ||
"address": "23 rue du palmier", | ||
"city": "Paris", | ||
"zipCode": "75000", | ||
"country": "FRA", | ||
"company": "Hello Asso", | ||
"dateOfBirth": "1986-07-06T00:00:00+02:00", | ||
"firstName": "John", | ||
"lastName": "Doe" | ||
}, | ||
"items": [ | ||
{ | ||
"shareAmount": 11000, | ||
"shareItemAmount": 10000, | ||
"shareOptionsAmount": 1000, | ||
"id": 12578, | ||
"amount": 30000, | ||
"type": "Membership", | ||
"state": "Processed" | ||
}, | ||
{ | ||
"shareAmount": 1000, | ||
"shareItemAmount": 1000, | ||
"id": 12579, | ||
"amount": 1000, | ||
"type": "Donation", | ||
"state": "Processed" | ||
} | ||
], | ||
"paymentReceiptUrl": "https://www.helloasso.com/associations/association-exemple/evenements/formulaire-exemple/paiement-attestation/12578", | ||
"id": 12345, | ||
"amount": 5550, | ||
"date": "2024-04-04T23:12:53.6767445+02:00", | ||
"paymentMeans": "Card", | ||
"installmentNumber": 1, | ||
"state": "Authorized", | ||
"meta": { | ||
"createdAt": "2024-04-04T23:12:53.6767445+02:00", | ||
"updatedAt": "2024-04-04T23:12:53.6767445+02:00" | ||
} | ||
}, | ||
"eventType": "Payment" | ||
} |