From 674f7c8341f984dea833f4fe996f8456cac4728d Mon Sep 17 00:00:00 2001 From: = Date: Sun, 15 Aug 2021 12:24:50 +1000 Subject: [PATCH] Verify Stripe accounts --- app/PaymentDrivers/Stripe/Connect/Verify.php | 64 ++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 app/PaymentDrivers/Stripe/Connect/Verify.php diff --git a/app/PaymentDrivers/Stripe/Connect/Verify.php b/app/PaymentDrivers/Stripe/Connect/Verify.php new file mode 100644 index 000000000000..b6a4cf0121ec --- /dev/null +++ b/app/PaymentDrivers/Stripe/Connect/Verify.php @@ -0,0 +1,64 @@ +stripe = $stripe; + } + + public function verifyAccountLinked() + { + $this->stripe->init(); + + $map = $this->stripe->company_gateway->client_gateway_tokens->map(function ($cgt){ + + $customer = Customer::retrieve($cgt->gateway_customer_reference, $this->stripe->stripe_connect_auth); + + return [ + 'customer' => $cgt->gateway_customer_reference, + 'record' => $customer + ]; + + }); + + return $map; + } +} \ No newline at end of file