sessions parsing
This commit is contained in:
@@ -465,6 +465,7 @@ header {
|
||||
.stripe-btn {
|
||||
width: 100%;
|
||||
padding: 0 0.5em;
|
||||
margin: 0.25em 0;
|
||||
background: whitesmoke;
|
||||
color: black;
|
||||
border-radius: 2px;
|
||||
|
||||
@@ -15,7 +15,7 @@ function BitsBtn(args) {
|
||||
stripe,
|
||||
account,
|
||||
} = args;
|
||||
function onClick(e) {
|
||||
function subscribeClick(e) {
|
||||
stripe.redirectToCheckout({
|
||||
items: [{plan: 'plan_FGmRwawcOJJ7Nv', quantity: 1}],
|
||||
successUrl: 'http://localhost:40080/payments/success',
|
||||
@@ -23,16 +23,31 @@ function BitsBtn(args) {
|
||||
clientReferenceId: account.id
|
||||
});
|
||||
}
|
||||
|
||||
function bitsClick(e) {
|
||||
stripe.redirectToCheckout({
|
||||
items: [{sku: 'sku_FHUfNEhWQaVDaT', quantity: 1}],
|
||||
successUrl: 'http://localhost:40080/payments/success',
|
||||
cancelUrl: 'http://localhost:40080/payments/cancel',
|
||||
clientReferenceId: account.id
|
||||
});
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<div id="error-message"></div>
|
||||
<button
|
||||
onClick={onClick}
|
||||
onClick={subscribeClick}
|
||||
class="stripe-btn"
|
||||
id="checkout-button-sku_FGjPl1YKoT241P"
|
||||
role="link">
|
||||
Subscribe
|
||||
</button>
|
||||
<button
|
||||
onClick={bitsClick}
|
||||
class="stripe-btn"
|
||||
role="link">
|
||||
Get Bits
|
||||
</button>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user