Browse Source
Merge pull request #1 from app-vise/analysis-z4nakn
Apply fixes from StyleCI
proxy_request
Daan Geurts
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
6 additions and
13 deletions
-
src/model/AppleNotification.php
-
src/model/Receipt.php
-
src/model/RenewalInfo.php
-
tests/IntegrationTest.php
-
tests/TestCase.php
-
tests/__fixtures__/request.php
|
|
@ -8,12 +8,11 @@ class AppleNotification extends Model |
|
|
|
{ |
|
|
|
public $guarded = []; |
|
|
|
|
|
|
|
public static function storeNotification(String $notificationType, NotificationPayload $notificationPayload) |
|
|
|
public static function storeNotification(string $notificationType, NotificationPayload $notificationPayload) |
|
|
|
{ |
|
|
|
return self::create([ |
|
|
|
'type' => $notificationType, |
|
|
|
'payload' => serialize($notificationPayload), |
|
|
|
]); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
@ -2,8 +2,6 @@ |
|
|
|
|
|
|
|
namespace Appvise\AppStoreNotifications\Model; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Receipt |
|
|
|
{ |
|
|
|
private $originalTransactionId; |
|
|
@ -37,7 +35,6 @@ class Receipt |
|
|
|
|
|
|
|
public function __construct() |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static function createFromArray(array $receiptInfo) |
|
|
@ -75,7 +72,6 @@ class Receipt |
|
|
|
return $instance; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Get the value of bid. |
|
|
|
*/ |
|
|
|
|
|
@ -2,7 +2,6 @@ |
|
|
|
|
|
|
|
namespace Appvise\AppStoreNotifications\Model; |
|
|
|
|
|
|
|
|
|
|
|
class RenewalInfo |
|
|
|
{ |
|
|
|
private $autoRenewProductId; |
|
|
@ -16,7 +15,6 @@ class RenewalInfo |
|
|
|
private $gracePeriodExpiresDateMs; |
|
|
|
private $gracePeriodExpiresDatePst; |
|
|
|
|
|
|
|
|
|
|
|
public function __construct() |
|
|
|
{ |
|
|
|
} |
|
|
@ -33,8 +31,10 @@ class RenewalInfo |
|
|
|
$instance->priceConsentStatus = $pendingRenewalInfo['price_consent_status'] ?? null; |
|
|
|
$instance->gracePeriodExpiresDate = $pendingRenewalInfo['grace_period_expires_date'] ?? null; |
|
|
|
$instance->gracePeriodExpiresDatePst = $pendingRenewalInfo['grace_period_expires_date_pst'] ?? null; |
|
|
|
|
|
|
|
return $instance; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Get the value of autoRenewProductId. |
|
|
|
*/ |
|
|
|
|
|
@ -73,5 +73,4 @@ class IntegrationTest extends TestCase |
|
|
|
|
|
|
|
Queue::assertNotPushed(DummyJob::class); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
@ -2,12 +2,12 @@ |
|
|
|
|
|
|
|
namespace Appvise\AppStoreNotifications\Tests; |
|
|
|
|
|
|
|
use Appvise\AppStoreNotifications\NotificationsServiceProvider; |
|
|
|
use Exception; |
|
|
|
use CreateAppleNotificationsTable; |
|
|
|
use Illuminate\Foundation\Exceptions\Handler; |
|
|
|
use Illuminate\Contracts\Debug\ExceptionHandler; |
|
|
|
use Orchestra\Testbench\TestCase as OrchestraTestCase; |
|
|
|
use CreateAppleNotificationsTable; |
|
|
|
use Appvise\AppStoreNotifications\NotificationsServiceProvider; |
|
|
|
|
|
|
|
abstract class TestCase extends OrchestraTestCase |
|
|
|
{ |
|
|
@ -71,5 +71,4 @@ abstract class TestCase extends OrchestraTestCase |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
return json_decode('{ |
|
|
|
"environment": "Sandbox", |
|
|
|
"notification_type": "INITIAL_BUY", |
|
|
@ -62,7 +63,6 @@ return json_decode('{ |
|
|
|
}', true |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
//{ |
|
|
|
// "environment": "Sandbox", |
|
|
|
// "notification_type": "INITIAL_BUY", |
|
|
|