Skip to content

Commit 10494f7

Browse files
feat(hackathon): Add Paypal API, 7 down, 13 to go
1 parent 91e337c commit 10494f7

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
7+
use App\Http\Requests;
8+
use App\Http\Controllers\Controller;
9+
10+
class PaypalController extends Controller
11+
{
12+
/**
13+
* Return all data to the Paypal API dashboard
14+
* @return mixed
15+
*/
16+
public function getPage()
17+
{
18+
return view('api.paypal');
19+
}
20+
}

app/Http/routes.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@
6969
'middleware' => ['auth']
7070
]);
7171

72+
Route::get('/api/paypal', [
73+
'uses' => 'PaypalController@getPage',
74+
'as' => 'api.paypal',
75+
'middleware' => ['auth']
76+
]);
77+
7278
Route::post('/tweet/new', [
7379
'uses' => 'TwitterController@sendTweet',
7480
'as' => 'tweet.new',

resources/views/api/paypal.blade.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@extends('layouts.master')
2+
3+
@section('content')
4+
<div class="main-container">
5+
@include('layouts.partials.alerts')
6+
7+
<div class="page-header">
8+
<h2><i style="color: #1B4A7D" class="fa fa-paypal"></i> PayPal API</h2>
9+
</div>
10+
11+
<div class="btn-group btn-group-justified">
12+
<a href="https://developer.paypal.com/docs/integration/direct/make-your-first-call/" target="_blank" class="btn btn-primary">
13+
<i class="fa fa-check-square-o"></i> Quickstart
14+
</a>
15+
<a href="https://developer.paypal.com/docs/api/" target="_blank" class="btn btn-primary">
16+
<i class="fa fa-code"></i> API Reference
17+
</a>
18+
<a href="https://devtools-paypal.com/hateoas/index.html" target="_blank" class="btn btn-primary">
19+
<i class="fa fa-gear"></i> API Playground
20+
</a>
21+
</div>
22+
23+
<h3>Sample Payment</h3>
24+
25+
<div>
26+
<p>Redirects to PayPal and allows authorizing the sample payment.</p>
27+
<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&amp;token=EC-2AJ301489F161603E">
28+
<button class="btn btn-primary">Authorize payment</button>
29+
</a>
30+
</div>
31+
</div>
32+
@stop

resources/views/layouts/master.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div class="container">
1717
@yield('content')
1818
</div>
19-
<footer>
19+
<footer class="footer navbar-fixed-bottom">
2020
<div class="container text-center">
2121
<p class="pull-left">© 2015 Company, Inc. All Rights Reserved</p>
2222
<ul class="pull-right list-inline">

0 commit comments

Comments
 (0)