-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5070e7
commit ec011a1
Showing
17 changed files
with
407 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
app/Http/Controllers/SubscriptionConfirmationController.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Services\SubscriptionService; | ||
use App\Http\Requests\StoreSubscriptionRequest; | ||
|
||
class SubscriptionRequestController extends Controller | ||
{ | ||
/** | ||
* @var SubscriptionService | ||
*/ | ||
protected $subscriptionService; | ||
|
||
public function __construct(SubscriptionService $subscriptionService) | ||
{ | ||
$this->subscriptionService = $subscriptionService; | ||
} | ||
|
||
public function store(StoreSubscriptionRequest $request) | ||
{ | ||
$this->subscriptionService->storeSubscriptionRequest($request); | ||
|
||
return redirect()->route('landing.show'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Libraries; | ||
|
||
use Ixudra\Curl\Facades\Curl; | ||
|
||
class EmailOctopusApi | ||
{ | ||
protected $baseApiUrl; | ||
|
||
protected $apiKey; | ||
|
||
public function __construct() | ||
{ | ||
$this->baseApiUrl = config('emailoctopus.general.base-api-url'); | ||
$this->apiKey = config('emailoctopus.general.api-key'); | ||
} | ||
|
||
public function createContactOfAList(string $listId, $emailAddress) | ||
{ | ||
$url = sprintf('%s/lists/%s/contacts', $this->baseApiUrl, $listId); | ||
|
||
return Curl::to($url)->withData([ | ||
'api_key' => $this->apiKey, | ||
'email_address' => $emailAddress, | ||
])->asJsonRequest() | ||
->post(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.