diff --git a/app/PaymentDrivers/Stripe/ACSS.php b/app/PaymentDrivers/Stripe/ACSS.php index 7f3c0cc4a116..69069bf76400 100644 --- a/app/PaymentDrivers/Stripe/ACSS.php +++ b/app/PaymentDrivers/Stripe/ACSS.php @@ -154,6 +154,7 @@ class ACSS 'interval_description' => 'when any invoice becomes due', 'transaction_type' => 'personal' // TODO: check if is company or personal https://stripe.com/docs/payments/acss-debit ], + 'verification_method' => 'instant', ] ] ], $this->stripe->stripe_connect_auth); @@ -183,7 +184,7 @@ class ACSS $this->stripe->payment_hash->save(); if (property_exists($gateway_response, 'status') && $gateway_response->status == 'processing') { - $this->storePaymentMethod($gateway_response); + // $this->storePaymentMethod($gateway_response); return $this->processSuccessfulPayment($gateway_response->id); } return $this->processUnsuccessfulPayment(); @@ -243,12 +244,13 @@ class ACSS private function storePaymentMethod($intent) { + try { $method = $this->stripe->getStripePaymentMethod($intent->payment_method); $payment_meta = new \stdClass; - $payment_meta->brand = (string) \sprintf('%s (%s)', $method->au_becs_debit->bank_code, ctrans('texts.acss')); - $payment_meta->last4 = (string) $method->au_becs_debit->last4; + $payment_meta->brand = (string) $method->acss_debit->bank_name; + $payment_meta->last4 = (string) $method->acss_debit->last4; $payment_meta->state = 'authorized'; $payment_meta->type = GatewayType::ACSS; diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 7d0ed85771de..5826cb36761a 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -533,12 +533,10 @@ class StripePaymentDriver extends BaseDriver //payment_intent.succeeded - this will confirm or cancel the payment if($request->type === 'payment_intent.succeeded'){ PaymentIntentWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(10); - // PaymentIntentWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id); return response()->json([], 200); } if ($request->type === 'charge.succeeded') { - // if ($request->type === 'charge.succeeded' || $request->type === 'payment_intent.succeeded') { foreach ($request->data as $transaction) { diff --git a/resources/views/portal/ninja2020/components/livewire/payment-methods-table.blade.php b/resources/views/portal/ninja2020/components/livewire/payment-methods-table.blade.php index f480d3514ad9..0faa5f515c48 100644 --- a/resources/views/portal/ninja2020/components/livewire/payment-methods-table.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/payment-methods-table.blade.php @@ -67,7 +67,7 @@ {{ $payment_method->formatDateTimestamp($payment_method->created_at, $client->date_format()) }}