AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

MerchantAccounts.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Commerce\Payments;
  3. use App\Models\Store;
  4. /**
  5. * Merchants' own payment accounts (Stripe Connect). Shoppers pay straight into them, never into ours.
  6. */
  7. interface MerchantAccounts
  8. {
  9. /**
  10. * Open a new account for the store. Returns the provider's account id.
  11. *
  12. * @throws PaymentException
  13. */
  14. public function create(Store $store, string $email): string;
  15. /**
  16. * A one-time link to the provider's own sign-up form for the account.
  17. * The merchant comes back to $returnUrl, or to $refreshUrl when the link has expired.
  18. *
  19. * @throws PaymentException
  20. */
  21. public function setupLink(string $accountId, string $returnUrl, string $refreshUrl): string;
  22. /**
  23. * @throws PaymentException
  24. */
  25. public function status(string $accountId): MerchantAccountStatus;
  26. /**
  27. * Ask the provider to switch on a payment method for the account, and show it to shoppers.
  28. * Only possible once the merchant has finished the sign-up form.
  29. *
  30. * @param string $method One of StripeAccount::METHODS: "fpx" (online banking) or "grabpay".
  31. *
  32. * @throws PaymentException
  33. */
  34. public function requestMethod(string $accountId, string $method): void;
  35. }