From e4378d67c1e2f407802cb745731f2de2e4566b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F?= Date: Thu, 29 Sep 2022 16:00:34 +0200 Subject: [PATCH] Update Subscriptions.php --- .../BitinflowPaymentsWallet/Subscriptions.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Accounts/Traits/BitinflowPaymentsWallet/Subscriptions.php b/src/Accounts/Traits/BitinflowPaymentsWallet/Subscriptions.php index 309316e..41469be 100644 --- a/src/Accounts/Traits/BitinflowPaymentsWallet/Subscriptions.php +++ b/src/Accounts/Traits/BitinflowPaymentsWallet/Subscriptions.php @@ -10,7 +10,7 @@ class Subscriptions { // } - + /** * Get subscriptions from user. * @@ -37,21 +37,11 @@ class Subscriptions * name, description, period, price * and following attributes are optional: * vat, payload, ends_at, webhook_url, webhook_secret - * @param array $payload optional data that is stored in the subscription - * @param bool $checkout optional checkout it directly * @return object|false the subscription object * @throws GuzzleException */ - public function create(string $name, array $attributes, array $payload = [], bool $checkout = false): object|false + public function create(array $attributes): object|false { - $defaults = ['period' => 'monthly']; - $attributes = array_merge(array_merge($defaults, $attributes), [ - 'payload' => array_merge($payload, [ - 'name' => $name, - ]), - 'checkout' => $checkout - ]); - return $this->user->asPaymentsUser('POST', 'subscriptions', $attributes)->data; }