-
Notifications
You must be signed in to change notification settings - Fork 193
/
Copy pathWalletEndpoint.php
44 lines (38 loc) · 1.05 KB
/
WalletEndpoint.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace Mollie\Api\Endpoints;
use Mollie\Api\Resources\BaseResource;
class WalletEndpoint extends EndpointAbstract
{
/**
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
*
* @return void|BaseResource
*/
protected function getResourceObject()
{
// Not used
}
/**
* Obtain a new ApplePay payment session.
*
* @param string $domain
* @param string $validationUrl
* @param array $parameters
*
* @return false|string
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function requestApplePayPaymentSession($domain, $validationUrl, $parameters = [])
{
$body = $this->parseRequestBody(array_merge([
'domain' => $domain,
'validationUrl' => $validationUrl,
], $parameters));
$response = $this->client->performHttpCall(
self::REST_CREATE,
'wallets/applepay/sessions',
$body
);
return json_encode($response);
}
}