1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Updates for paypal + RFF

This commit is contained in:
David Bomba 2024-07-27 15:18:21 +10:00
parent 4008b24acd
commit 0f8737bdf7
10 changed files with 232 additions and 231 deletions

View File

@ -300,7 +300,9 @@ class InvitationController extends Controller
'signature' => false,
'contact_first_name' => $invitation->contact->first_name ?? '',
'contact_last_name' => $invitation->contact->last_name ?? '',
'contact_email' => $invitation->contact->email ?? ''
'contact_email' => $invitation->contact->email ?? '',
'client_city' => $invitation->client->city ?? '',
'client_postal_code' => $invitation->client->postal_code ?? '',
];
$request->replace($data);

View File

@ -108,11 +108,11 @@ class PaymentController extends Controller
*/
public function process(Request $request)
{
$request->validate([
'contact_first_name' => ['required'],
'contact_last_name' => ['required'],
'contact_email' => ['required', 'email'],
]);
// $request->validate([
// 'contact_first_name' => ['required'],
// 'contact_last_name' => ['required'],
// 'contact_email' => ['required', 'email'],
// ]);
return (new InstantPayment($request))->run();
}

View File

@ -351,9 +351,9 @@ class ClientContact extends Authenticatable implements HasLocalePreference
public function showRff(): bool
{
if (\strlen($this->first_name) === 0 || \strlen($this->last_name) === 0 || \strlen($this->email) === 0) {
return true;
}
// if (\strlen($this->first_name ?? '') === 0 || \strlen($this->last_name ?? '') === 0 || \strlen($this->email ?? '') === 0) {
// return true;
// }
return false;
}

View File

@ -44,17 +44,16 @@ class InstantPayment
public function run()
{
nlog($this->request->all());
/** @var \App\Models\ClientContact $cc */
$cc = auth()->guard('contact')->user();
$cc->first_name = $this->request->contact_first_name;
$cc->last_name = $this->request->contact_last_name;
$cc->email = $this->request->contact_email;
$cc->save();
$cc->client->postal_code = strlen($cc->client->postal_code ?? '') > 1 ? $cc->client->postal_code : $this->request->client_postal_code;
$cc->client->city = strlen($cc->client->city ?? '') > 1 ? $cc->client->city : $this->request->client_city;
$cc->client->shipping_postal_code = strlen($cc->client->shipping_postal_code ?? '') > 1 ? $cc->client->shipping_postal_code : $cc->client->postal_code;
$cc->client->shipping_city = strlen($cc->client->shipping_city ?? '') > 1 ? $cc->client->shipping_city : $cc->client->city;
$cc->pushQuietly();
$is_credit_payment = false;
@ -73,8 +72,6 @@ class InstantPayment
*/
$payable_invoices = collect($this->request->payable_invoices);
nlog($payable_invoices);
$invoices = Invoice::query()->whereIn('id', $this->transformKeys($payable_invoices->pluck('invoice_id')->toArray()))->withTrashed()->get();
$invoices->each(function ($invoice) {

338
composer.lock generated
View File

@ -740,16 +740,16 @@
},
{
"name": "braintree/braintree_php",
"version": "6.18.0",
"version": "6.19.0",
"source": {
"type": "git",
"url": "https://github.com/braintree/braintree_php.git",
"reference": "8ca67004fe2405ef0b6b33a5897594fdcf417e0e"
"reference": "f3178632ca098d1f96a429d665aabc4e95346c03"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/braintree/braintree_php/zipball/8ca67004fe2405ef0b6b33a5897594fdcf417e0e",
"reference": "8ca67004fe2405ef0b6b33a5897594fdcf417e0e",
"url": "https://api.github.com/repos/braintree/braintree_php/zipball/f3178632ca098d1f96a429d665aabc4e95346c03",
"reference": "f3178632ca098d1f96a429d665aabc4e95346c03",
"shasum": ""
},
"require": {
@ -783,9 +783,9 @@
"description": "Braintree PHP Client Library",
"support": {
"issues": "https://github.com/braintree/braintree_php/issues",
"source": "https://github.com/braintree/braintree_php/tree/6.18.0"
"source": "https://github.com/braintree/braintree_php/tree/6.19.0"
},
"time": "2024-03-26T21:08:13+00:00"
"time": "2024-07-23T20:09:58+00:00"
},
{
"name": "brick/math",
@ -2804,16 +2804,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "7.9.1",
"version": "7.9.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc"
"reference": "d281ed313b989f213357e3be1a179f02196ac99b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc",
"reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b",
"shasum": ""
},
"require": {
@ -2910,7 +2910,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.9.1"
"source": "https://github.com/guzzle/guzzle/tree/7.9.2"
},
"funding": [
{
@ -2926,7 +2926,7 @@
"type": "tidelift"
}
],
"time": "2024-07-19T16:19:57+00:00"
"time": "2024-07-24T11:22:20+00:00"
},
{
"name": "guzzlehttp/promises",
@ -4614,16 +4614,16 @@
},
{
"name": "laravel/framework",
"version": "v11.16.0",
"version": "v11.18.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4"
"reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/bd4808aaf103ccb5cb4b00bcee46140c070c0ec4",
"reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4",
"url": "https://api.github.com/repos/laravel/framework/zipball/b19ba518c56852567e99fbae9321bc436c2cc5a8",
"reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8",
"shasum": ""
},
"require": {
@ -4816,20 +4816,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2024-07-16T14:33:07+00:00"
"time": "2024-07-26T10:39:29+00:00"
},
{
"name": "laravel/pint",
"version": "v1.16.2",
"version": "v1.17.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca"
"reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca",
"reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca",
"url": "https://api.github.com/repos/laravel/pint/zipball/4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5",
"reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5",
"shasum": ""
},
"require": {
@ -4882,7 +4882,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2024-07-09T15:58:08+00:00"
"time": "2024-07-23T16:40:20+00:00"
},
{
"name": "laravel/prompts",
@ -5004,16 +5004,16 @@
},
{
"name": "laravel/slack-notification-channel",
"version": "v3.2.0",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/slack-notification-channel.git",
"reference": "fc8d1873e3db63a480bc57aebb4bf5ec05332d91"
"reference": "8cd988fad1a08ed88dfd852f140477376c60217f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/fc8d1873e3db63a480bc57aebb4bf5ec05332d91",
"reference": "fc8d1873e3db63a480bc57aebb4bf5ec05332d91",
"url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/8cd988fad1a08ed88dfd852f140477376c60217f",
"reference": "8cd988fad1a08ed88dfd852f140477376c60217f",
"shasum": ""
},
"require": {
@ -5063,9 +5063,9 @@
],
"support": {
"issues": "https://github.com/laravel/slack-notification-channel/issues",
"source": "https://github.com/laravel/slack-notification-channel/tree/v3.2.0"
"source": "https://github.com/laravel/slack-notification-channel/tree/v3.3.0"
},
"time": "2024-01-15T20:07:45+00:00"
"time": "2024-07-10T19:39:44+00:00"
},
{
"name": "laravel/socialite",
@ -5407,16 +5407,16 @@
},
{
"name": "league/commonmark",
"version": "2.5.0",
"version": "2.5.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "0026475f5c9a104410ae824cb5a4d63fa3bdb1df"
"reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0026475f5c9a104410ae824cb5a4d63fa3bdb1df",
"reference": "0026475f5c9a104410ae824cb5a4d63fa3bdb1df",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/ac815920de0eff6de947eac0a6a94e5ed0fb147c",
"reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c",
"shasum": ""
},
"require": {
@ -5509,7 +5509,7 @@
"type": "tidelift"
}
],
"time": "2024-07-22T18:18:14+00:00"
"time": "2024-07-24T12:52:09+00:00"
},
{
"name": "league/config",
@ -11342,16 +11342,16 @@
},
{
"name": "symfony/console",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "0aa29ca177f432ab68533432db0de059f39c92ae"
"reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae",
"reference": "0aa29ca177f432ab68533432db0de059f39c92ae",
"url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9",
"reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9",
"shasum": ""
},
"require": {
@ -11415,7 +11415,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v7.1.2"
"source": "https://github.com/symfony/console/tree/v7.1.3"
},
"funding": [
{
@ -11431,7 +11431,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T10:03:55+00:00"
"time": "2024-07-26T12:41:01+00:00"
},
{
"name": "symfony/css-selector",
@ -11567,16 +11567,16 @@
},
{
"name": "symfony/error-handler",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32"
"reference": "432bb369952795c61ca1def65e078c4a80dad13c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/2412d3dddb5c9ea51a39cfbff1c565fc9844ca32",
"reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/432bb369952795c61ca1def65e078c4a80dad13c",
"reference": "432bb369952795c61ca1def65e078c4a80dad13c",
"shasum": ""
},
"require": {
@ -11622,7 +11622,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v7.1.2"
"source": "https://github.com/symfony/error-handler/tree/v7.1.3"
},
"funding": [
{
@ -11638,7 +11638,7 @@
"type": "tidelift"
}
],
"time": "2024-06-25T19:55:06+00:00"
"time": "2024-07-26T13:02:51+00:00"
},
{
"name": "symfony/event-dispatcher",
@ -11864,16 +11864,16 @@
},
{
"name": "symfony/finder",
"version": "v7.1.1",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6"
"reference": "717c6329886f32dc65e27461f80f2a465412fdca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6",
"reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6",
"url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca",
"reference": "717c6329886f32dc65e27461f80f2a465412fdca",
"shasum": ""
},
"require": {
@ -11908,7 +11908,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v7.1.1"
"source": "https://github.com/symfony/finder/tree/v7.1.3"
},
"funding": [
{
@ -11924,20 +11924,20 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-07-24T07:08:44+00:00"
},
{
"name": "symfony/http-client",
"version": "v6.4.9",
"version": "v6.4.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "6e9db0025db565bcf8f1d46ed734b549e51e6045"
"reference": "b5e498f763e0bf5eed8dcd946e50a3b3f71d4ded"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/6e9db0025db565bcf8f1d46ed734b549e51e6045",
"reference": "6e9db0025db565bcf8f1d46ed734b549e51e6045",
"url": "https://api.github.com/repos/symfony/http-client/zipball/b5e498f763e0bf5eed8dcd946e50a3b3f71d4ded",
"reference": "b5e498f763e0bf5eed8dcd946e50a3b3f71d4ded",
"shasum": ""
},
"require": {
@ -12001,7 +12001,7 @@
"http"
],
"support": {
"source": "https://github.com/symfony/http-client/tree/v6.4.9"
"source": "https://github.com/symfony/http-client/tree/v6.4.10"
},
"funding": [
{
@ -12017,7 +12017,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T07:59:05+00:00"
"time": "2024-07-15T09:26:24+00:00"
},
{
"name": "symfony/http-client-contracts",
@ -12099,16 +12099,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v7.1.1",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "74d171d5b6a1d9e4bfee09a41937c17a7536acfa"
"reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/74d171d5b6a1d9e4bfee09a41937c17a7536acfa",
"reference": "74d171d5b6a1d9e4bfee09a41937c17a7536acfa",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/f602d5c17d1fa02f8019ace2687d9d136b7f4a1a",
"reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a",
"shasum": ""
},
"require": {
@ -12156,7 +12156,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v7.1.1"
"source": "https://github.com/symfony/http-foundation/tree/v7.1.3"
},
"funding": [
{
@ -12172,20 +12172,20 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-07-26T12:41:01+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6"
"reference": "db9702f3a04cc471ec8c70e881825db26ac5f186"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6",
"reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/db9702f3a04cc471ec8c70e881825db26ac5f186",
"reference": "db9702f3a04cc471ec8c70e881825db26ac5f186",
"shasum": ""
},
"require": {
@ -12270,7 +12270,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v7.1.2"
"source": "https://github.com/symfony/http-kernel/tree/v7.1.3"
},
"funding": [
{
@ -12286,7 +12286,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T13:13:31+00:00"
"time": "2024-07-26T14:58:15+00:00"
},
{
"name": "symfony/intl",
@ -12456,16 +12456,16 @@
},
{
"name": "symfony/mailgun-mailer",
"version": "v6.4.9",
"version": "v6.4.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailgun-mailer.git",
"reference": "c4917eb14f31fb5c21442375c6baf7f51bd924e8"
"reference": "3eb7c7b644179a766f5d816620b7b6d4a4e7ec43"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/c4917eb14f31fb5c21442375c6baf7f51bd924e8",
"reference": "c4917eb14f31fb5c21442375c6baf7f51bd924e8",
"url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/3eb7c7b644179a766f5d816620b7b6d4a4e7ec43",
"reference": "3eb7c7b644179a766f5d816620b7b6d4a4e7ec43",
"shasum": ""
},
"require": {
@ -12505,7 +12505,7 @@
"description": "Symfony Mailgun Mailer Bridge",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/mailgun-mailer/tree/v6.4.9"
"source": "https://github.com/symfony/mailgun-mailer/tree/v6.4.10"
},
"funding": [
{
@ -12521,7 +12521,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T07:59:05+00:00"
"time": "2024-07-04T11:16:22+00:00"
},
{
"name": "symfony/mime",
@ -13540,16 +13540,16 @@
},
{
"name": "symfony/process",
"version": "v7.1.1",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "febf90124323a093c7ee06fdb30e765ca3c20028"
"reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028",
"reference": "febf90124323a093c7ee06fdb30e765ca3c20028",
"url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca",
"reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca",
"shasum": ""
},
"require": {
@ -13581,7 +13581,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v7.1.1"
"source": "https://github.com/symfony/process/tree/v7.1.3"
},
"funding": [
{
@ -13597,7 +13597,7 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-07-26T12:44:47+00:00"
},
{
"name": "symfony/property-access",
@ -13677,16 +13677,16 @@
},
{
"name": "symfony/property-info",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/property-info.git",
"reference": "d7b91e4aa07e822a9b935fc29a7254c12d502f16"
"reference": "88a279df2db5b7919cac6f35d6a5d1d7147e6a9b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/d7b91e4aa07e822a9b935fc29a7254c12d502f16",
"reference": "d7b91e4aa07e822a9b935fc29a7254c12d502f16",
"url": "https://api.github.com/repos/symfony/property-info/zipball/88a279df2db5b7919cac6f35d6a5d1d7147e6a9b",
"reference": "88a279df2db5b7919cac6f35d6a5d1d7147e6a9b",
"shasum": ""
},
"require": {
@ -13741,7 +13741,7 @@
"validator"
],
"support": {
"source": "https://github.com/symfony/property-info/tree/v7.1.2"
"source": "https://github.com/symfony/property-info/tree/v7.1.3"
},
"funding": [
{
@ -13757,20 +13757,20 @@
"type": "tidelift"
}
],
"time": "2024-06-26T07:21:35+00:00"
"time": "2024-07-26T07:36:36+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
"version": "v7.1.1",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
"reference": "9a5dbb606da711f5d40a7596ad577856f9402140"
"reference": "1365d10f5476f74a27cf9c2d1eee70c069019db0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/9a5dbb606da711f5d40a7596ad577856f9402140",
"reference": "9a5dbb606da711f5d40a7596ad577856f9402140",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/1365d10f5476f74a27cf9c2d1eee70c069019db0",
"reference": "1365d10f5476f74a27cf9c2d1eee70c069019db0",
"shasum": ""
},
"require": {
@ -13824,7 +13824,7 @@
"psr-7"
],
"support": {
"source": "https://github.com/symfony/psr-http-message-bridge/tree/v7.1.1"
"source": "https://github.com/symfony/psr-http-message-bridge/tree/v7.1.3"
},
"funding": [
{
@ -13840,20 +13840,20 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-07-17T06:10:24+00:00"
},
{
"name": "symfony/routing",
"version": "v7.1.1",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "60c31bab5c45af7f13091b87deb708830f3c96c0"
"reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/60c31bab5c45af7f13091b87deb708830f3c96c0",
"reference": "60c31bab5c45af7f13091b87deb708830f3c96c0",
"url": "https://api.github.com/repos/symfony/routing/zipball/8a908a3f22d5a1b5d297578c2ceb41b02fa916d0",
"reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0",
"shasum": ""
},
"require": {
@ -13905,7 +13905,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v7.1.1"
"source": "https://github.com/symfony/routing/tree/v7.1.3"
},
"funding": [
{
@ -13921,20 +13921,20 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-07-17T06:10:24+00:00"
},
{
"name": "symfony/serializer",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/serializer.git",
"reference": "d2077674aaaff02a95f290de512aa358947e6bbe"
"reference": "0d5ddac365fbfffc30ca9bc944ad3eb9b3763c09"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/serializer/zipball/d2077674aaaff02a95f290de512aa358947e6bbe",
"reference": "d2077674aaaff02a95f290de512aa358947e6bbe",
"url": "https://api.github.com/repos/symfony/serializer/zipball/0d5ddac365fbfffc30ca9bc944ad3eb9b3763c09",
"reference": "0d5ddac365fbfffc30ca9bc944ad3eb9b3763c09",
"shasum": ""
},
"require": {
@ -14002,7 +14002,7 @@
"description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/serializer/tree/v7.1.2"
"source": "https://github.com/symfony/serializer/tree/v7.1.3"
},
"funding": [
{
@ -14018,7 +14018,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T07:42:43+00:00"
"time": "2024-07-17T06:10:24+00:00"
},
{
"name": "symfony/service-contracts",
@ -14105,16 +14105,16 @@
},
{
"name": "symfony/string",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8"
"reference": "ea272a882be7f20cad58d5d78c215001617b7f07"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8",
"reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8",
"url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07",
"reference": "ea272a882be7f20cad58d5d78c215001617b7f07",
"shasum": ""
},
"require": {
@ -14172,7 +14172,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v7.1.2"
"source": "https://github.com/symfony/string/tree/v7.1.3"
},
"funding": [
{
@ -14188,20 +14188,20 @@
"type": "tidelift"
}
],
"time": "2024-06-28T09:27:18+00:00"
"time": "2024-07-22T10:25:37+00:00"
},
{
"name": "symfony/translation",
"version": "v7.1.1",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3"
"reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3",
"reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3",
"url": "https://api.github.com/repos/symfony/translation/zipball/8d5e50c813ba2859a6dfc99a0765c550507934a1",
"reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1",
"shasum": ""
},
"require": {
@ -14266,7 +14266,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v7.1.1"
"source": "https://github.com/symfony/translation/tree/v7.1.3"
},
"funding": [
{
@ -14282,7 +14282,7 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-07-26T12:41:01+00:00"
},
{
"name": "symfony/translation-contracts",
@ -14520,16 +14520,16 @@
},
{
"name": "symfony/validator",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/validator.git",
"reference": "bed12b7d5bd4dac452db5fa6203331c876b489e7"
"reference": "ba711a6cfc008544dad059abb3c1d997f1472237"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/validator/zipball/bed12b7d5bd4dac452db5fa6203331c876b489e7",
"reference": "bed12b7d5bd4dac452db5fa6203331c876b489e7",
"url": "https://api.github.com/repos/symfony/validator/zipball/ba711a6cfc008544dad059abb3c1d997f1472237",
"reference": "ba711a6cfc008544dad059abb3c1d997f1472237",
"shasum": ""
},
"require": {
@ -14597,7 +14597,7 @@
"description": "Provides tools to validate values",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/validator/tree/v7.1.2"
"source": "https://github.com/symfony/validator/tree/v7.1.3"
},
"funding": [
{
@ -14613,20 +14613,20 @@
"type": "tidelift"
}
],
"time": "2024-06-25T19:55:06+00:00"
"time": "2024-07-26T12:41:01+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v7.1.2",
"version": "v7.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d"
"reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/5857c57c6b4b86524c08cf4f4bc95327270a816d",
"reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/86af4617cca75a6e28598f49ae0690f3b9d4591f",
"reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f",
"shasum": ""
},
"require": {
@ -14680,7 +14680,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v7.1.2"
"source": "https://github.com/symfony/var-dumper/tree/v7.1.3"
},
"funding": [
{
@ -14696,7 +14696,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T08:00:31+00:00"
"time": "2024-07-26T12:41:01+00:00"
},
{
"name": "symfony/yaml",
@ -15856,30 +15856,38 @@
},
{
"name": "composer/pcre",
"version": "3.1.4",
"version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "04229f163664973f68f38f6f73d917799168ef24"
"reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24",
"reference": "04229f163664973f68f38f6f73d917799168ef24",
"url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90",
"reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<1.11.8"
},
"require-dev": {
"phpstan/phpstan": "^1.3",
"phpstan/phpstan": "^1.11.8",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^5"
"phpunit/phpunit": "^8 || ^9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"autoload": {
@ -15907,7 +15915,7 @@
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.1.4"
"source": "https://github.com/composer/pcre/tree/3.2.0"
},
"funding": [
{
@ -15923,7 +15931,7 @@
"type": "tidelift"
}
],
"time": "2024-05-27T13:40:54+00:00"
"time": "2024-07-25T09:36:02+00:00"
},
{
"name": "composer/semver",
@ -16253,16 +16261,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.59.3",
"version": "v3.60.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29"
"reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29",
"reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/e595e4e070d17c5d42ed8c4206f630fcc5f401a4",
"reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4",
"shasum": ""
},
"require": {
@ -16344,7 +16352,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.60.0"
},
"funding": [
{
@ -16352,7 +16360,7 @@
"type": "github"
}
],
"time": "2024-06-16T14:17:03+00:00"
"time": "2024-07-25T09:26:51+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@ -17022,16 +17030,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.11.7",
"version": "1.11.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d"
"reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/52d2bbfdcae7f895915629e4694e9497d0f8e28d",
"reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
"reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
"shasum": ""
},
"require": {
@ -17076,7 +17084,7 @@
"type": "github"
}
],
"time": "2024-07-06T11:17:41+00:00"
"time": "2024-07-24T07:01:22+00:00"
},
{
"name": "phpunit/php-code-coverage",
@ -17874,31 +17882,31 @@
},
{
"name": "react/socket",
"version": "v1.15.0",
"version": "v1.16.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/socket.git",
"reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038"
"reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038",
"reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038",
"url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
"reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
"shasum": ""
},
"require": {
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"php": ">=5.3.0",
"react/dns": "^1.11",
"react/dns": "^1.13",
"react/event-loop": "^1.2",
"react/promise": "^3 || ^2.6 || ^1.2.1",
"react/stream": "^1.2"
"react/promise": "^3.2 || ^2.6 || ^1.2.1",
"react/stream": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/async": "^4 || ^3 || ^2",
"react/async": "^4.3 || ^3.3 || ^2",
"react/promise-stream": "^1.4",
"react/promise-timer": "^1.10"
"react/promise-timer": "^1.11"
},
"type": "library",
"autoload": {
@ -17942,7 +17950,7 @@
],
"support": {
"issues": "https://github.com/reactphp/socket/issues",
"source": "https://github.com/reactphp/socket/tree/v1.15.0"
"source": "https://github.com/reactphp/socket/tree/v1.16.0"
},
"funding": [
{
@ -17950,7 +17958,7 @@
"type": "open_collective"
}
],
"time": "2023-12-15T11:02:10+00:00"
"time": "2024-07-26T10:38:09+00:00"
},
{
"name": "react/stream",
@ -19011,16 +19019,16 @@
},
{
"name": "spatie/error-solutions",
"version": "1.1.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/error-solutions.git",
"reference": "a014da18f2675ea15af0ba97f7e9aee59e13964f"
"reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/error-solutions/zipball/a014da18f2675ea15af0ba97f7e9aee59e13964f",
"reference": "a014da18f2675ea15af0ba97f7e9aee59e13964f",
"url": "https://api.github.com/repos/spatie/error-solutions/zipball/ae7393122eda72eed7cc4f176d1e96ea444f2d67",
"reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67",
"shasum": ""
},
"require": {
@ -19073,7 +19081,7 @@
],
"support": {
"issues": "https://github.com/spatie/error-solutions/issues",
"source": "https://github.com/spatie/error-solutions/tree/1.1.0"
"source": "https://github.com/spatie/error-solutions/tree/1.1.1"
},
"funding": [
{
@ -19081,7 +19089,7 @@
"type": "github"
}
],
"time": "2024-07-22T08:18:22+00:00"
"time": "2024-07-25T11:06:04+00:00"
},
{
"name": "spatie/flare-client-php",

View File

@ -23,7 +23,7 @@
"src": "resources/js/clients/invoices/action-selectors.js"
},
"resources/js/clients/invoices/payment.js": {
"file": "assets/payment-357f3929.js",
"file": "assets/payment-36249364.js",
"isEntry": true,
"src": "resources/js/clients/invoices/payment.js"
},
@ -240,7 +240,7 @@
"src": "resources/js/setup/setup.js"
},
"resources/sass/app.scss": {
"file": "assets/app-906435d5.css",
"file": "assets/app-ec452b34.css",
"isEntry": true,
"src": "resources/sass/app.scss"
}

View File

@ -9,41 +9,47 @@
*/
class Payment {
constructor(displayTerms, displaySignature, displayRff) {
constructor(displayTerms, displaySignature) {
this.shouldDisplayTerms = displayTerms;
this.shouldDisplaySignature = displaySignature;
this.shouldDisplayRff = displayRff;
this.submitting = false;
this.steps = new Map()
if (this.shouldDisplayRff) {
this.steps.set("rff", {
element: document.getElementById('displayRequiredFieldsModal'),
nextButton: document.getElementById('rff-next-step'),
callback: () => {
const fields = {
firstName: document.querySelector('input[name="rff_first_name"]'),
lastName: document.querySelector('input[name="rff_last_name"]'),
email: document.querySelector('input[name="rff_email"]'),
}
if (fields.firstName) {
document.querySelector('input[name="contact_first_name"]').value = fields.firstName.value;
}
if (fields.lastName) {
document.querySelector('input[name="contact_last_name"]').value = fields.lastName.value;
}
if (fields.email) {
document.querySelector('input[name="contact_email"]').value = fields.email.value;
}
this.steps.set("rff", {
element: document.getElementById('displayRequiredFieldsModal'),
nextButton: document.getElementById('rff-next-step'),
callback: () => {
const fields = {
firstName: document.querySelector('input[name="rff_first_name"]'),
lastName: document.querySelector('input[name="rff_last_name"]'),
email: document.querySelector('input[name="rff_email"]'),
city: document.querySelector('input[name="rff_city"]'),
postalCode: document.querySelector('input[name="rff_postal_code"]'),
}
});
}
if (fields.firstName) {
document.querySelector('input[name="contact_first_name"]').value = fields.firstName.value;
}
if (fields.lastName) {
document.querySelector('input[name="contact_last_name"]').value = fields.lastName.value;
}
if (fields.email) {
document.querySelector('input[name="contact_email"]').value = fields.email.value;
}
if (fields.city) {
document.querySelector('input[name="client_city"]').value = fields.city.value;
}
if (fields.postalCode) {
document.querySelector('input[name="client_postal_code"]').value = fields.postalCode.value;
}
}
});
if (this.shouldDisplaySignature) {
this.steps.set("signature", {
@ -74,17 +80,8 @@ class Payment {
document.getElementById("payment_method_id").value =
element.dataset.gatewayTypeId;
if (element.dataset.isPaypal == '1') {
var rff_city = document.getElementById("rff_city");
var rff_postal_code = document.getElementById("rff_postal_code");
if (rff_city)
rff_city.classList.remove('hidden');
if (rff_postal_code)
rff_postal_code.classList.remove('hidden');
if (element.dataset.isPaypal != '1') {
this.steps.delete("rff");
}
if (this.steps.size === 0) {
@ -139,6 +136,5 @@ const signature = document.querySelector(
).content;
const terms = document.querySelector('meta[name="show-invoice-terms"]').content;
const rff = document.querySelector('meta[name="show-required-fields-form"]').content;
new Payment(Boolean(+terms), Boolean(+signature), Boolean(+rff)).handle();
new Payment(Boolean(+terms), Boolean(+signature)).handle();

View File

@ -99,7 +99,7 @@
@endif
@if(strlen(auth()->guard('contact')->user()->client->city) === 0)
<div class="col-span-6 sm:col-span-3 hidden" id="rff_city">
<div class="col-span-6 sm:col-span-3" id="rff_city">
<label for="city" class="input-label">{{ ctrans('texts.city') }}</label>
<input
id="rff_city"
@ -115,7 +115,7 @@
@endif
@if(strlen(auth()->guard('contact')->user()->client->postal_code) === 0)
<div class="col-span-6 sm:col-span-3 hidden" id="rff_postal_code">
<div class="col-span-6 sm:col-span-3" id="rff_postal_code">
<label for="postal_code" class="input-label">{{ ctrans('texts.postal_code') }}</label>
<input
id="rff_postal_code"
@ -215,7 +215,7 @@
this.validateCity();
this.validatePostalCode();
if (!this.errors.rff_first_name && !this.errors.rff_last_name) {
if (!this.errors.rff_first_name && !this.errors.rff_last_name && !this.errors.email && !this.errors.rff_postal_code && !this.errors.rff_city) {
const next_rff = document.getElementById('rff-next-step');
next_rff.click();

View File

@ -4,7 +4,6 @@
@push('head')
<meta name="show-invoice-terms" content="{{ $settings->show_accept_invoice_terms ? true : false }}">
<meta name="require-invoice-signature" content="{{ $client->user->account->hasFeature(\App\Models\Account::FEATURE_INVOICE_SETTINGS) && $settings->require_invoice_signature }}">
<meta name="show-required-fields-form" content="{{ auth()->guard('contact')->user()->showRff() }}" />
<script src="{{ asset('vendor/signature_pad@2.3.2/signature_pad.min.js') }}"></script>
@endpush

View File

@ -4,7 +4,6 @@
@push('head')
<meta name="show-invoice-terms" content="{{ $settings->show_accept_invoice_terms ? true : false }}">
<meta name="require-invoice-signature" content="{{ $client->user->account->hasFeature(\App\Models\Account::FEATURE_INVOICE_SETTINGS) && $settings->require_invoice_signature }}">
<meta name="show-required-fields-form" content="{{ auth()->guard('contact')->user()->showRff() }}" />
@include('portal.ninja2020.components.no-cache')
<script src="{{ asset('vendor/signature_pad@2.3.2/signature_pad.min.js') }}"></script>