Open PCMARTINEAU opened 3 years ago
joinhoney.com/invite/ljun9gz
const stripe = require('stripe')('sk_test_51HhFhzDvpc2jxCLaHYFSNaHid1vzaedLVDPoq2BncyNJy3RZPTzZIdfkMYkP88bjti76xaPDsgZFMQw90l5UK7j500vsgZN8iR');
const express = require('express');
const app = express();
app.use(express.static('.'));
const ESOTERIC_U = 'http://localhost:4242';
app.post('/create-checkout-session', async (req, res) => {
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: 'Stubborn Attachments',
images: ['https://i.imgur.com/EHyR2nP.png'],
},
unit_amount: 2000,
},
quantity: 1,
},
],
mode: 'payment',
success_url: ${ESOTERIC_U}/success.html
,
});
res.json({ id: session.id });
});
app.listen(4242, () => console.log('Running on port 4242'));
apply plugin: 'com.android.application'
android { ... }
dependencies { // ...
// Stripe Android SDK implementation 'com.stripe:stripe-android:16.0.1'
// AndroidX Browser library implementation 'androidx.browser:browser:1.2.0'
}<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".activity.ConnectWithStripeActivity">
</androidx.constraintlayout.widget.ConstraintLayout> Kotlin Java ConnectWithStripeActivity.kt class ConnectWithStripeActivity : AppCompatActivity() {
}