| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
-
- namespace App\Commerce\Payments;
-
- use App\Models\Store;
-
- /**
- * Merchants' own payment accounts (Stripe Connect). Shoppers pay straight into them, never into ours.
- */
- interface MerchantAccounts
- {
- /**
- * Open a new account for the store. Returns the provider's account id.
- *
- * @throws PaymentException
- */
- public function create(Store $store, string $email): string;
-
- /**
- * A one-time link to the provider's own sign-up form for the account.
- * The merchant comes back to $returnUrl, or to $refreshUrl when the link has expired.
- *
- * @throws PaymentException
- */
- public function setupLink(string $accountId, string $returnUrl, string $refreshUrl): string;
-
- /**
- * @throws PaymentException
- */
- public function status(string $accountId): MerchantAccountStatus;
-
- /**
- * Ask the provider to switch on FPX (online banking) for the account, and show it to shoppers.
- * Only possible once the merchant has finished the sign-up form.
- *
- * @throws PaymentException
- */
- public function requestFpx(string $accountId): void;
- }
|