Commit 65fc376e authored by Nikolai R Kristiansen's avatar Nikolai R Kristiansen

Merge branch 'feature/stripe' into 'master'

Pay with stripe in app

See merge request !2
parents 1d756c7e 451c0499
Pipeline #540 failed with stage
in 1 minute and 20 seconds
......@@ -37,12 +37,12 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true
[version]
^0.53.0
^0.56.0
......@@ -50,10 +50,13 @@ buck-out/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
*/fastlane/test_output
android/google_play.json
.env
.env*
*.swp
# Sentry
android/sentry.properties
ios/sentry.properties
ios/Pods
image: node:latest
image: node:carbon
cache:
paths:
......
## Install
# See https://facebook.github.io/react-native/docs/getting-started.html#content
yarn
cd ios; pod install # ios only
# Environment settings
cp env-example .env
# Sentry
# Get auth token from https://sentry.neuf.no/api/ with project:write scope
cp ios/sentry.properties-example ios/sentry.properties
cp android/sentry.properties-example android/sentry.properties
react-native start
react-native run-android
......@@ -22,6 +18,13 @@
# Make sure you have hw.keyboard=yes in your avd config.ini (in $HOME/.android/avd/.../) for reloading when pressing R twice to work.
## Prepare release build
# Sentry
# Get auth token from https://sentry.neuf.no/api/ with project:write scope
cp ios/sentry.properties-example ios/sentry.properties
cp android/sentry.properties-example android/sentry.properties
## Create release build (Android)
# Aquire the keystore and put it in android/app/dusken-client.keystore
......@@ -32,10 +35,13 @@
DUSKEN_RELEASE_KEY_PASSWORD=
# Build
yarn build-android
yarn build-android # Output is in android/app/build/outputs/apk
# Output is in android/app/build/outputs/apk
# Note: Make sure you have the file android/google_play.json
# Ref: https://docs.fastlane.tools/actions/supply/#setup
# Publish android build to the Google Play beta track
yarn release-android
## Libraries
......
import 'react-native';
import React from 'react';
import App from '../src/App';
import 'isomorphic-fetch';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
import 'isomorphic-fetch';
it('renders correctly', () => {
const tree = renderer.create(
......
......@@ -103,8 +103,8 @@ android {
applicationId "no.neuf.chateau"
minSdkVersion 16
targetSdkVersion 23
versionCode 17
versionName "1.1.3"
versionCode 19
versionName "1.2.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
......@@ -159,6 +159,7 @@ android {
}
dependencies {
compile project(':tipsi-stripe')
compile project(':react-native-sentry')
compile project(':react-native-config')
compile fileTree(dir: "libs", include: ["*.jar"])
......
......@@ -3,6 +3,7 @@ package no.neuf.chateau;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.gettipsi.stripe.StripeReactPackage;
import io.sentry.RNSentryPackage;
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
import com.facebook.react.ReactInstanceManager;
......@@ -26,6 +27,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new StripeReactPackage(),
new RNSentryPackage(MainApplication.this),
new ReactNativeConfigPackage()
);
......
......@@ -13,7 +13,9 @@ buildscript {
}
allprojects {
repositories {
repositories {
// Add jitpack repository (added by tipsi-stripe)
maven { url "https://jitpack.io" }
mavenLocal()
jcenter()
maven {
......
json_key_file "google_play.json" # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name "no.neuf.chateau" # e.g. com.krausefx.app
# Customise this file, documentation can be found here:
# https://docs.fastlane.tools/actions/
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.62.1"
default_platform :android
platform :android do
desc "Submit a new build to the Google Play Beta track"
lane :beta do
# build the release variant
gradle(task: "assembleRelease")
# upload to Google Play
supply(track: "beta")
end
end
fastlane documentation
================
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```
xcode-select --install
```
## Choose your installation method:
<table width="100%" >
<tr>
<th width="33%"><a href="http://brew.sh">Homebrew</a></th>
<th width="33%">Installer Script</th>
<th width="33%">RubyGems</th>
</tr>
<tr>
<td width="33%" align="center">macOS</td>
<td width="33%" align="center">macOS</td>
<td width="33%" align="center">macOS or Linux with Ruby 2.0.0 or above</td>
</tr>
<tr>
<td width="33%"><code>brew cask install fastlane</code></td>
<td width="33%"><a href="https://download.fastlane.tools">Download the zip file</a>. Then double click on the <code>install</code> script (or run it in a terminal window).</td>
<td width="33%"><code>sudo gem install fastlane -NV</code></td>
</tr>
</table>
# Available Actions
## Android
### android beta
```
fastlane android beta
```
Submit a new build to the Google Play Beta track
----
This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
You can do the following:
- See your proof of membership
- Buy or renew your membership
- See the event schedule with all of our events
\ No newline at end of file
Your proof of membership and the event schedule at Chateau Neuf
\ No newline at end of file
Chateau Neuf
\ No newline at end of file
Du kan gjøre følgende
- Se ditt medlemskapsbevis
- Kjøpe og fornye medlemskap
- Se programmet med alle våre arrangementer
\ No newline at end of file
Medlemskapsbevis og program for Chateau Neuf
\ No newline at end of file
Chateau Neuf - Det Norske Studentersamfund
\ No newline at end of file
rootProject.name = 'Dusken'
include ':tipsi-stripe'
project(':tipsi-stripe').projectDir = new File(rootProject.projectDir, '../node_modules/tipsi-stripe/android')
include ':react-native-sentry'
project(':react-native-sentry').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sentry/android')
include ':react-native-config'
......
EVENT_API_URL=https://studentersamfundet.no
DUSKEN_API_URL=https://galtinn.neuf.no
DUSKEN_PURCHASE_URL=https://galtinn.neuf.no/?utm_source=purchase-button&utm_medium=app
DUSKEN_FORGOT_PASSWORD_URL=https://galtinn.neuf.no/auth/password_reset/
SENTRY_DSN=
\ No newline at end of file
SENTRY_DSN=
STRIPE_PUBLISHABLE_KEY=
\ No newline at end of file
......@@ -3,6 +3,8 @@ import { AppRegistry } from "react-native";
import { Sentry } from 'react-native-sentry';
import Config from 'react-native-config';
Sentry.config(Config.SENTRY_DSN).install();
if(Config.SENTRY_DSN) {
Sentry.config(Config.SENTRY_DSN).install();
}
AppRegistry.registerComponent('Dusken', () => App);
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Dusken.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
{
"images":[
{
"idiom":"iphone",
"size":"20x20",
"scale":"2x",
"filename":"Icon-App-20x20@2x.png"
},
{
"idiom":"iphone",
"size":"20x20",
"scale":"3x",
"filename":"Icon-App-20x20@3x.png"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"1x",
"filename":"Icon-App-29x29@1x.png"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"2x",
"filename":"Icon-App-29x29@2x.png"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"3x",
"filename":"Icon-App-29x29@3x.png"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"1x",
"filename":"Icon-App-40x40@1x.png"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"2x",
"filename":"Icon-App-40x40@2x.png"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"3x",
"filename":"Icon-App-40x40@3x.png"
},
{
"idiom":"iphone",
"size":"57x57",
"scale":"1x",
"filename":"Icon-App-57x57@1x.png"
},
{
"idiom":"iphone",
"size":"57x57",
"scale":"2x",
"filename":"Icon-App-57x57@2x.png"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"1x",
"filename":"Icon-App-60x60@1x.png"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"2x",
"filename":"Icon-App-60x60@2x.png"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"3x",
"filename":"Icon-App-60x60@3x.png"
},
{
"idiom":"iphone",
"size":"76x76",
"scale":"1x",
"filename":"Icon-App-76x76@1x.png"
},
{
"idiom":"ipad",
"size":"20x20",
"scale":"1x",
"filename":"Icon-App-20x20@1x.png"
},
{
"idiom":"ipad",
"size":"20x20",
"scale":"2x",
"filename":"Icon-App-20x20@2x.png"
},
{
"idiom":"ipad",
"size":"29x29",
"scale":"1x",
"filename":"Icon-App-29x29@1x.png"
},
{
"idiom":"ipad",
"size":"29x29",
"scale":"2x",
"filename":"Icon-App-29x29@2x.png"
},
{
"idiom":"ipad",
"size":"40x40",
"scale":"1x",
"filename":"Icon-App-40x40@1x.png"
},
{
"idiom":"ipad",
"size":"40x40",
"scale":"2x",
"filename":"Icon-App-40x40@2x.png"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon-Small-50x50@1x.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon-Small-50x50@2x.png",
"scale" : "2x"
},
{
"idiom":"ipad",
"size":"72x72",
"scale":"1x",
"filename":"Icon-App-72x72@1x.png"
},
{
"idiom":"ipad",
"size":"72x72",
"scale":"2x",
"filename":"Icon-App-72x72@2x.png"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"1x",
"filename":"Icon-App-76x76@1x.png"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"2x",
"filename":"Icon-App-76x76@2x.png"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"3x",
"filename":"Icon-App-76x76@3x.png"
},
{
"idiom":"ipad",
"size":"83.5x83.5",
"scale":"2x",
"filename":"Icon-App-83.5x83.5@2x.png"
}
],
"info":{
"version":1,
"author":"makeappicon"
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon-App-57x57@1x.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon-App-57x57@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon-Small-50x50@1x.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon-Small-50x50@2x.png",
"scale" : "2x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "Icon-App-72x72@1x.png",
"scale" : "1x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "Icon-App-72x72@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "app_icon.jpg",
"scale" : "1x"
}
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
......@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<string>1.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>6</string>
<string>8</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
......
platform :ios, '9.0'
target 'Dusken' do
pod 'Stripe', '~> 11.2.0'
end
PODS:
- Stripe (11.2.0)