Skip to content

Commit ec5a5cd

Browse files
committed
updating stripe integration and updating our favicon and title
1 parent ac19905 commit ec5a5cd

File tree

5 files changed

+3
-29
lines changed

5 files changed

+3
-29
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"proxy": "http://localhost:5000",
55
"private": true,
66
"dependencies": {
7-
"axios": "0.18.0",
87
"firebase": "6.0.2",
98
"node-sass": "4.12.0",
109
"react": "^16.8.6",

public/favicon.ico

11 KB
Binary file not shown.

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
work correctly both with client-side routing and a non-root public URL.
2424
Learn how to configure a non-root public URL by running `npm run build`.
2525
-->
26-
<title>React App</title>
26+
<title>CRWN Clothing</title>
2727
</head>
2828
<body>
2929
<noscript>You need to enable JavaScript to run this app.</noscript>

src/components/stripe-button/stripe-button.component.jsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
11
import React from 'react';
22
import StripeCheckout from 'react-stripe-checkout';
3-
import axios from 'axios';
43

54
const StripeCheckoutButton = ({ price }) => {
65
const priceForStripe = price * 100;
76
const publishableKey = 'pk_test_WBqax2FWVzS9QlpJScO07iuL';
87

98
const onToken = token => {
109
console.log(token);
11-
axios({
12-
url: '/payment',
13-
method: 'post',
14-
data: {
15-
amount: priceForStripe,
16-
token: token
17-
}
18-
})
19-
.then(response => {
20-
console.log(response);
21-
})
22-
.catch(error => {
23-
console.log('Payment Error: ', error);
24-
alert(
25-
'There was an issue with your payment! Please make sure to use the provided credit card data'
26-
);
27-
});
10+
alert('Payment Succesful!');
2811
};
2912

3013
return (

yarn.lock

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,14 +2067,6 @@ aws4@^1.8.0:
20672067
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
20682068
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
20692069

2070-
2071-
version "0.18.0"
2072-
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102"
2073-
integrity sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=
2074-
dependencies:
2075-
follow-redirects "^1.3.0"
2076-
is-buffer "^1.1.5"
2077-
20782070
axobject-query@^2.0.2:
20792071
version "2.0.2"
20802072
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9"
@@ -4379,7 +4371,7 @@ flush-write-stream@^1.0.0:
43794371
inherits "^2.0.3"
43804372
readable-stream "^2.3.6"
43814373

4382-
follow-redirects@^1.0.0, follow-redirects@^1.3.0:
4374+
follow-redirects@^1.0.0:
43834375
version "1.7.0"
43844376
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76"
43854377
integrity sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==

0 commit comments

Comments
 (0)