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 / log
Created June 27, 2019 20:07
npm run build-docs
MacBook-Pro-4:tipsi-stripe davemacdonald$ npm run build-docs
> [email protected] build-docs /Users/davemacdonald/dev/stripe/tipsi-stripe
> scripts/build-docs.sh
> @ build /Users/davemacdonald/dev/stripe/tipsi-stripe/website/docs
> docusaurus-build
/Users/davemacdonald/.nvm/versions/node/v11.6.0/lib/node_modules/docusaurus/node_modules/@babel/core/lib/config/files/plugins.js:152
@mindlapse
mindlapse / build log
Created July 7, 2019 17:57
tipsi-stripe #497 - build log when attempting to revert to RN 0.45.0 with the latest stripe-android
MacBook-Pro-4:android davemacdonald$ npm run test:android
> [email protected] test:android /Users/davemacdonald/dev/stripe/tipsi-stripe/example
> TEST_SUITE=android appium-helper --platform android
Appium is running on: 0.0.0.0:4723
Found next Android device: Android SDK built for x86 (emulator-5554), version: 8.0.0
-------------------------------------
Error while executing tests:
@mindlapse
mindlapse / gist:2f4942411f6185696019eb17f6d14cda
Created July 15, 2019 00:07
NullPointerException in example app: GoogleApiPayFlowImpl$1.onComplete
--------- beginning of crash
07-14 23:58:22.639 3119 3119 E AndroidRuntime: FATAL EXCEPTION: main
07-14 23:58:22.639 3119 3119 E AndroidRuntime: Process: com.example, PID: 3119
07-14 23:58:22.639 3119 3119 E AndroidRuntime: java.lang.NullPointerException: ApiException
07-14 23:58:22.639 3119 3119 E AndroidRuntime: at com.gettipsi.stripe.util.ArgCheck.nonNull(ArgCheck.java:17)
07-14 23:58:22.639 3119 3119 E AndroidRuntime: at com.gettipsi.stripe.Errors.toErrorCode(Errors.java:34)
07-14 23:58:22.639 3119 3119 E AndroidRuntime: at com.gettipsi.stripe.GoogleApiPayFlowImpl$1.onComplete(GoogleApiPayFlowImpl.java:86)
07-14 23:58:22.639 3119 3119 E AndroidRuntime: at com.google.android.gms.tasks.zzf.run(Unknown Source)
07-14 23:58:22.639 3119 3119 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
07-14 23:58:22.639 3119 3119 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
@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 [email protected]...
yarn add v1.12.3
info No lockfile found.
[1/4] Resolving packages...
warning react-native > create-react-class > fbjs > [email protected]: 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 [email protected]: The platform "linux" is incompatible with this module.
@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
[admin]
aws_access_key_id=***************
aws_secret_access_key=***************
service: sleepmode
provider:
name: aws
runtime: nodejs10.x
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:DescribeInstances"
service: sleepmode # NOTE: update this with your service name
provider:
name: aws
runtime: nodejs10.x
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:DescribeInstances"
'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) => {
@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