Skip to content

Instantly share code, notes, and snippets.

View mindlapse's full-sized avatar
🎯
Focusing

Dave MacDonald mindlapse

🎯
Focusing
View GitHub Profile
@mindlapse
mindlapse / gist:443cae9b37c36d564d02ab0072f8a879
Created October 4, 2020 15:19
Error: Unprocessable Entity
$ cdktf init
[1] python
[2] python-pip
[3] typescript
[4] typescript-minimal
[0] CANCEL
What template you want to use? [1...4 / 0]: 3
functions:
myLambdaFunction:
handler: handler.myLambdaFunction
events:
- eventBridge:
pattern:
source:
- Stripe
detail-type:
- payment_intent.succeeded
{
"detail-type": [
"payment_intent.succeeded"
],
"source": [
"Stripe"
]
}
@mindlapse
mindlapse / guide.md
Last active September 7, 2021 15:05
A guide on how to use PaymentIntents with tipsi-stripe

Introduction

Card payments with Stripe should be performed with PaymentIntents.

This API was created to handle modern payments, where the cardholder's bank may require the user to authenticate themselves with the bank before a payment can be authorized.

Authentication requirements first started to appear with European banks regulated by PSD2 which introduced [Strong Customer Authentication

'use strict';
const AWS = require('aws-sdk');
const TAG = process.env.TAG
const SNS_TOPIC_ARN = process.env.SNS_TOPIC_ARN
const ec2 = new AWS.EC2()
// Used to send a notification to SNS
const sendNotification = async (subject, instanceIds) => {
service: sleepmode # NOTE: update this with your service name
provider:
name: aws
runtime: nodejs10.x
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:DescribeInstances"
service: sleepmode
provider:
name: aws
runtime: nodejs10.x
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:DescribeInstances"
[admin]
aws_access_key_id=***************
aws_secret_access_key=***************
@mindlapse
mindlapse / logcat output
Created August 6, 2019 19:17
SetupIntent issue in stripe-android - logcat
```
08-06 15:13:20.478 17016 17016 W System.err: com.stripe.android.exception.InvalidRequestException: You cannot confirm this SetupIntent because it's missing a payment method. Update the SetupIntent with a payment method and then confirm it again.; request-id: req_DRwGpA9WfR3mhw
08-06 15:13:20.478 17016 17016 W System.err: at com.stripe.android.StripeApiHandler.handleAPIError(StripeApiHandler.java:1014)
08-06 15:13:20.478 17016 17016 W System.err: at com.stripe.android.StripeApiHandler.makeApiRequest(StripeApiHandler.java:1061)
08-06 15:13:20.478 17016 17016 W System.err: at com.stripe.android.StripeApiHandler.confirmSetupIntent(StripeApiHandler.java:180)
08-06 15:13:20.478 17016 17016 W System.err: at com.stripe.android.PaymentController$ConfirmStripeIntentTask.getResult(PaymentController.java:436)
08-06 15:13:20.478 17016 17016 W System.err: at com.stripe.android.PaymentController$ConfirmStripeIntentTask.getResult(PaymentController.java:410)
08-06 15:13:20.478 17016 17016 W System.err: a
@mindlapse
mindlapse / transcript.txt
Created July 25, 2019 02:50
Failed: react-native init helloworld --version 0.59.10
$ react-native init helloworld --version 0.59.10
This will walk you through creating a new React Native project in /home/titan/shared/tera/cloud9/tmp/tar/helloworld
Using yarn v1.12.3
Installing react-native@0.59.10...
yarn add v1.12.3
info No lockfile found.
[1/4] Resolving packages...
warning react-native > create-react-class > fbjs > core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.