From ff49f21b588fb80ce0e9b26a1e5b56931d0080a2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 2 Apr 2024 18:31:51 +1100 Subject: [PATCH] Authorize .net adjustments for storing multiple payment methods --- .../Authorize/AuthorizePaymentMethod.php | 6 +++++- lang/en/texts.php | 14 +++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/PaymentDrivers/Authorize/AuthorizePaymentMethod.php b/app/PaymentDrivers/Authorize/AuthorizePaymentMethod.php index 22eac01927a0..85e0c70a6501 100644 --- a/app/PaymentDrivers/Authorize/AuthorizePaymentMethod.php +++ b/app/PaymentDrivers/Authorize/AuthorizePaymentMethod.php @@ -101,9 +101,10 @@ class AuthorizePaymentMethod $gateway_customer_reference = (new AuthorizeCreateCustomer($this->authorize, $this->authorize->client))->create($data); $payment_profile = $this->addPaymentMethodToClient($gateway_customer_reference, $data); - $this->createClientGatewayToken($payment_profile, $gateway_customer_reference); } + $this->createClientGatewayToken($payment_profile, $gateway_customer_reference); + return redirect()->route('client.payment_methods.index'); } @@ -168,6 +169,9 @@ class AuthorizePaymentMethod $billto->setCity(substr($this->authorize->client->city, 0, 40)); $billto->setState(substr($this->authorize->client->state, 0, 40)); $billto->setZip(substr($this->authorize->client->postal_code, 0, 20)); + + if(isset($contact->email) && str_contains($contact->email, '@')) + $billto->setEmail($contact->email); if ($this->authorize->client->country_id) { $billto->setCountry($this->authorize->client->country->name); diff --git a/lang/en/texts.php b/lang/en/texts.php index 048c83d15258..ce6272208f75 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -1173,8 +1173,8 @@ $lang = array( 'invoice_number_padding' => 'Padding', 'preview' => 'Preview', 'list_vendors' => 'List Vendors', - 'add_users_not_supported' => 'Upgrade to the Enterprise plan to add additional users to your account.', - 'enterprise_plan_features' => 'The Enterprise plan adds support for multiple users and file attachments, :link to see the full list of features.', + 'add_users_not_supported' => 'Upgrade to the Enterprise Plan to add additional users to your account.', + 'enterprise_plan_features' => 'The Enterprise Plan adds support for multiple users and file attachments, :link to see the full list of features.', 'return_to_app' => 'Return To App', @@ -1323,7 +1323,7 @@ $lang = array( 'security' => 'Security', 'see_whats_new' => 'See what\'s new in v:version', 'wait_for_upload' => 'Please wait for the document upload to complete.', - 'upgrade_for_permissions' => 'Upgrade to our Enterprise plan to enable permissions.', + 'upgrade_for_permissions' => 'Upgrade to our Enterprise Plan to enable permissions.', 'enable_second_tax_rate' => 'Enable specifying a second tax rate', 'payment_file' => 'Payment File', 'expense_file' => 'Expense File', @@ -2697,7 +2697,7 @@ $lang = array( 'no_assets' => 'No images, drag to upload', 'add_image' => 'Add Image', 'select_image' => 'Select Image', - 'upgrade_to_upload_images' => 'Upgrade to the enterprise plan to upload images', + 'upgrade_to_upload_images' => 'Upgrade to the Enterprise Plan to upload images', 'delete_image' => 'Delete Image', 'delete_image_help' => 'Warning: deleting the image will remove it from all proposals.', 'amount_variable_help' => 'Note: the invoice $amount field will use the partial/deposit field if set otherwise it will use the invoice balance.', @@ -3053,7 +3053,7 @@ $lang = array( 'valid_until_days' => 'Valid Until', 'valid_until_days_help' => 'Automatically sets the Valid Until value on quotes to this many days in the future. Leave blank to disable.', 'usually_pays_in_days' => 'Days', - 'requires_an_enterprise_plan' => 'Requires an enterprise plan', + 'requires_an_enterprise_plan' => 'Requires an Enterprise Plan', 'take_picture' => 'Take Picture', 'upload_file' => 'Upload File', 'new_document' => 'New Document', @@ -3977,7 +3977,7 @@ $lang = array( 'notification_credit_bounced_subject' => 'Unable to deliver Credit :invoice', 'save_payment_method_details' => 'Save payment method details', 'new_card' => 'New card', - 'new_bank_account' => 'New bank account', + 'new_bank_account' => 'Add Bank Account', 'company_limit_reached' => 'Limit of :limit companies per account.', 'credits_applied_validation' => 'Total credits applied cannot be MORE than total of invoices', 'credit_number_taken' => 'Credit number already taken', @@ -5196,7 +5196,7 @@ $lang = array( 'nordigen_handler_error_heading_account_config_invalid' => 'Missing Credentials', 'nordigen_handler_error_contents_account_config_invalid' => 'Invalid or missing credentials for Gocardless Bank Account Data. Contact support for help, if this issue persists.', 'nordigen_handler_error_heading_not_available' => 'Not Available', - 'nordigen_handler_error_contents_not_available' => 'Feature unavailable, enterprise plan only.', + 'nordigen_handler_error_contents_not_available' => 'Feature unavailable, Enterprise Plan only.', 'nordigen_handler_error_heading_institution_invalid' => 'Invalid Institution', 'nordigen_handler_error_contents_institution_invalid' => 'The provided institution-id is invalid or no longer valid.', 'nordigen_handler_error_heading_ref_invalid' => 'Invalid Reference',