diff --git a/app/Console/Commands/TestBot.php b/app/Console/Commands/TestBot.php deleted file mode 100644 index bb4b4a249a..0000000000 --- a/app/Console/Commands/TestBot.php +++ /dev/null @@ -1,54 +0,0 @@ -info(date('Y-m-d').' Running TestBot...'); - - $clientId = env('MSBOT_CLIENT_ID'); - $clientSecret = env('MSBOT_CLIENT_SECRET'); - - $data = sprintf('grant_type=client_credentials&client_id=%s&client_secret=%s&scope=https://graph.microsoft.com/.default', $clientId, $clientSecret); - $curl = curl_init(); - - $opts = [ - CURLOPT_URL => MSBOT_LOGIN_URL, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_POST => 'POST', - CURLOPT_POSTFIELDS => $data, - ]; - - curl_setopt_array($curl, $opts); - $response = print_r(curl_exec($response)); - curl_close($curl); - - print_r($response); - } -} diff --git a/database/migrations/2016_04_23_182223_payments_changes.php b/database/migrations/2016_04_23_182223_payments_changes.php index 844555942b..41476222ab 100644 --- a/database/migrations/2016_04_23_182223_payments_changes.php +++ b/database/migrations/2016_04_23_182223_payments_changes.php @@ -1,5 +1,6 @@ string('name'); }); - (new \PaymentStatusSeeder())->run(); + $statuses = [ + ['id' => '1', 'name' => 'Pending'], + ['id' => '2', 'name' => 'Voided'], + ['id' => '3', 'name' => 'Failed'], + ['id' => '4', 'name' => 'Completed'], + ['id' => '5', 'name' => 'Partially Refunded'], + ['id' => '6', 'name' => 'Refunded'], + ]; + + Eloquent::unguard(); + foreach ($statuses as $status) { + $record = PaymentStatus::find($status['id']); + if ($record) { + $record->name = $status['name']; + $record->save(); + } else { + PaymentStatus::create($status); + } + } + Eloquent::reguard(); Schema::dropIfExists('payment_methods'); @@ -92,7 +112,7 @@ class PaymentsChanges extends Migration $table->foreign('default_payment_method_id')->references('id')->on('payment_methods'); }); - + } /**