Skip to content

Commit

Permalink
v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Apr 24, 2020
1 parent dc297f1 commit 822a300
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"iyzipay"
],
"homepage": "https://github.com/afbora/iyzipay-laravel",
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",
"authors": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ public function up()
$table->string('alias', 100);
$table->string('number', 10);
$table->string('token');
$table->unique(['billable_id', 'token']);
$table->string('bank')->nullable();
$table->timestamps();
$table->softDeletes();

$table->unique(['billable_id', 'token']);
});
}

Expand Down
2 changes: 0 additions & 2 deletions src/Commands/SubscriptionChargeCommand.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace Afbora\IyzipayLaravel\Commands;


use Afbora\IyzipayLaravel\Events\SubscriptionCouldNotPaid;
use Afbora\IyzipayLaravel\Exceptions\Transaction\TransactionSaveException;
use Afbora\IyzipayLaravel\Models\Subscription;
Expand Down
1 change: 0 additions & 1 deletion src/Events/SubscriptionCouldNotPaid.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SubscriptionCouldNotPaid
{

/**
* @var Payable
*/
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/Card/CardRemoveException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace Afbora\IyzipayLaravel\Exceptions\Card;

class CardRemoveException extends \Exception
Expand Down
5 changes: 3 additions & 2 deletions src/IyzipayLaravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Afbora\IyzipayLaravel\Traits\PreparesCreditCardRequest;
use Afbora\IyzipayLaravel\Traits\PreparesTransactionRequest;
use Carbon\Carbon;
use Exception;
use Illuminate\Support\Collection;
use Iyzipay\Model\ApiTest;
use Iyzipay\Model\Payment;
Expand Down Expand Up @@ -166,7 +167,7 @@ private function checkApiOptions()
{
try {
$check = ApiTest::retrieve($this->apiOptions);
} catch (\Exception $e) {
} catch (Exception $e) {
throw new IyzipayConnectionException();
}

Expand Down Expand Up @@ -241,7 +242,7 @@ private function storeTransactionModel(

protected function getLocale(): string
{
return (config('app.locale') == 'tr') ? Locale::TR : Locale::EN;
return config('app.locale') === 'tr' ? Locale::TR : Locale::EN;
}

protected function getOptions(): Options
Expand Down
2 changes: 1 addition & 1 deletion src/Payable.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function paySubscription()
$transaction->save();
}

$subscription->next_charge_at = $subscription->next_charge_at->addMonths(($subscription->plan->interval == 'yearly') ? 12 : 1);
$subscription->next_charge_at = $subscription->next_charge_at->addMonths(($subscription->plan->interval === 'yearly') ? 12 : 1);
$subscription->save();
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/PayableContract.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace Afbora\IyzipayLaravel;

use Afbora\IyzipayLaravel\Models\CreditCard;
Expand All @@ -11,7 +10,6 @@

interface PayableContract
{

public function getKey();

public function creditCards(): HasMany;
Expand Down
1 change: 0 additions & 1 deletion src/ProductContract.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace Afbora\IyzipayLaravel;

interface ProductContract
Expand Down
1 change: 0 additions & 1 deletion src/StorableClasses/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class Address extends StorableClass
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/StorableClasses/BillFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class BillFields extends StorableClass
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/StorableClasses/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class Plan extends StorableClass implements ProductContract
{

/**
* The plan's id
*
Expand Down
1 change: 0 additions & 1 deletion src/StorableClasses/StorableClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

abstract class StorableClass
{

/**
* StorableClass constructor.
*
Expand Down

0 comments on commit 822a300

Please sign in to comment.