Browse Source

Fix stripe error during email reset

master
Immanuel Onyeka 3 years ago
parent
commit
29361616ce
5 changed files with 8 additions and 19 deletions
  1. +0
    -2
      app/Http/Controllers/UserController.php
  2. +0
    -1
      app/Mail/ChangeEmail.php
  3. +0
    -1
      app/Mail/SupportTicket.php
  4. +0
    -1
      config/mail.php
  5. +8
    -14
      resources/views/change-email.blade.php

+ 0
- 2
app/Http/Controllers/UserController.php View File

@@ -123,7 +123,6 @@ class UserController extends Controller
}

public function resetEmail(Request $request) {
Stripe::setApiKey(config('services.stripe.secret'));

if (! $request->hasValidSignature()) {
abort(401);
@@ -140,7 +139,6 @@ class UserController extends Controller
$user = User::find($request->user);
$user->email = $request->email;
$user->save();
Customer::update($user->customer_id, ['name' => $request->email]);

return view('email-changed');
}


+ 0
- 1
app/Mail/ChangeEmail.php View File

@@ -33,7 +33,6 @@ class ChangeEmail extends Mailable
public function build()
{
$this->view('change-email');
$this->from('donotreply@trendplays.com');
$this->subject('Email change requested');
return $this;
}


+ 0
- 1
app/Mail/SupportTicket.php View File

@@ -42,7 +42,6 @@ class SupportTicket extends Mailable
public function build()
{
$this->view('support-ticket');
$this->from('donotreply@trendplays.com');
$this->subject("Ticket: $this->id, $this->type");
$this->replyTo($this->email);
return $this;


+ 0
- 1
config/mail.php View File

@@ -42,7 +42,6 @@ return [
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => env('MAIL_AUTH_MODE'),
],

'ses' => [


+ 8
- 14
resources/views/change-email.blade.php View File

@@ -1,23 +1,17 @@
@extends('master')

@section('title', 'Change Email')

@section('head-metas')
@parent
<link rel="stylesheet" href="/css/app.css">
<link rel="stylesheet" href="/css/panel.css">
@endsection

@section('content')
@parent

<main id="ticket-email">
<main class="body" id="ticket-email">
<h3>An email change has been requested from {{$current_email}}</h3>

<a href="{{$link}}"><button>Confirm</button></a>
<div>
<a href="{{$link}}"><h4>Confirm</h4></a>
</div>

<small>If you do not recognize this activity, please disregard this
message.</small>
<div>
<small>If you do not recognize this activity, please disregard this
message.</small>
</div>
</main>

@endsection


Loading…
Cancel
Save