File manager - Edit - /home/verseaumee/blueversion/wp-content/plugins/give/src/PaymentGateways/Gateways/Stripe/Actions/UpdateStripeAccountStatementDescriptor.php
Back
<?php namespace Give\PaymentGateways\Gateways\Stripe\Actions; use Give\Framework\Exceptions\Primitives\InvalidArgumentException; use Give\PaymentGateways\Exceptions\InvalidPropertyName; use Give\PaymentGateways\Stripe\Models\AccountDetail; use Give\PaymentGateways\Stripe\Repositories\Settings; /** * @since 2.19.0 */ class UpdateStripeAccountStatementDescriptor { /** * * @param string $stripeAccountId * @param string $stripeStatementDescriptorText * * @return bool * @throws InvalidArgumentException|InvalidPropertyName */ public function __invoke($stripeAccountId, $stripeStatementDescriptorText) { $settingRepository = give(Settings::class); $stripeAccount = $settingRepository->getStripeAccountById($stripeAccountId); if ($stripeStatementDescriptorText === $stripeAccount->statementDescriptor) { return true; } $newStripeAccount = AccountDetail::fromArray( array_merge( $stripeAccount->toArray(), ['statement_descriptor' => $stripeStatementDescriptorText] ) ); return $settingRepository->updateStripeAccount($newStripeAccount); } }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings