Skip to content

Commit ea71ae4

Browse files
authored
Merge pull request #398 from razorpay/f/sdk_availability
update the framework value to match react_native for SDK Dashboard. Updated SDK version to 1.6.19
2 parents 8781cb4 + 1e65c48 commit ea71ae4

File tree

98 files changed

+9896
-9288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+9896
-9288
lines changed
File renamed without changes.

example/SampleApp/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1
File renamed without changes.

example/SampleProject/.flowconfig renamed to example/SampleApp/.flowconfig

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,41 @@
88
; Ignore polyfills
99
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; These should not be required directly
12-
; require from fbjs/lib instead: require('fbjs/lib/warning')
13-
node_modules/warning/.*
14-
1511
; Flow doesn't support platforms
1612
.*/Libraries/Utilities/LoadingView.js
1713

14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15+
1816
[untyped]
1917
.*/node_modules/@react-native-community/cli/.*/.*
2018

2119
[include]
2220

2321
[libs]
24-
node_modules/react-native/Libraries/react-native/react-native-interface.js
22+
node_modules/react-native/interface.js
2523
node_modules/react-native/flow/
2624

2725
[options]
2826
emoji=true
2927

30-
esproposal.optional_chaining=enable
31-
esproposal.nullish_coalescing=enable
28+
exact_by_default=true
29+
30+
format.bracket_spacing=false
3231

3332
module.file_ext=.js
3433
module.file_ext=.json
3534
module.file_ext=.ios.js
3635

3736
munge_underscores=true
3837

39-
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
4038
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
41-
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
39+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
4240

4341
suppress_type=$FlowIssue
4442
suppress_type=$FlowFixMe
4543
suppress_type=$FlowFixMeProps
4644
suppress_type=$FlowFixMeState
4745

48-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
50-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51-
5246
[lints]
5347
sketchy-null-number=warn
5448
sketchy-null-mixed=warn
@@ -57,10 +51,8 @@ untyped-type-import=warn
5751
nonstrict-import=warn
5852
deprecated-type=warn
5953
unsafe-getters-setters=warn
60-
inexact-spread=warn
6154
unnecessary-invariant=warn
6255
signature-verification-failure=warn
63-
deprecated-utility=error
6456

6557
[strict]
6658
deprecated-type
@@ -72,4 +64,4 @@ untyped-import
7264
untyped-type-import
7365

7466
[version]
75-
^0.105.0
67+
^0.170.0

example/SampleProject/.gitignore renamed to example/SampleApp/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ build/
2828
.gradle
2929
local.properties
3030
*.iml
31+
*.hprof
3132

3233
# node.js
3334
#
@@ -55,5 +56,6 @@ buck-out/
5556
# Bundle artifact
5657
*.jsbundle
5758

58-
# CocoaPods
59+
# Ruby / CocoaPods
5960
/ios/Pods/
61+
/vendor/bundle/
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
bracketSpacing: false,
3-
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
67
};

example/SampleApp/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.4
File renamed without changes.

example/SampleApp/App.js

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
* @flow strict-local
7+
*/
8+
9+
import React from 'react';
10+
import type {Node} from 'react';
11+
import {
12+
Button,
13+
SafeAreaView,
14+
ScrollView,
15+
StatusBar,
16+
StyleSheet,
17+
Text,
18+
useColorScheme,
19+
View,
20+
} from 'react-native';
21+
22+
import {
23+
Colors,
24+
DebugInstructions,
25+
Header,
26+
LearnMoreLinks,
27+
ReloadInstructions,
28+
} from 'react-native/Libraries/NewAppScreen';
29+
30+
import RazorpayCheckout from 'react-native-razorpay';
31+
32+
const Section = ({children, title}): Node => {
33+
const isDarkMode = useColorScheme() === 'dark';
34+
return (
35+
<View style={styles.sectionContainer}>
36+
<Text
37+
style={[
38+
styles.sectionTitle,
39+
{
40+
color: isDarkMode ? Colors.white : Colors.black,
41+
},
42+
]}>
43+
{title}
44+
</Text>
45+
<Text
46+
style={[
47+
styles.sectionDescription,
48+
{
49+
color: isDarkMode ? Colors.light : Colors.dark,
50+
},
51+
]}>
52+
{children}
53+
</Text>
54+
</View>
55+
);
56+
};
57+
58+
const App: () => Node = () => {
59+
const isDarkMode = useColorScheme() === 'dark';
60+
61+
const backgroundStyle = {
62+
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
63+
};
64+
65+
return (
66+
<SafeAreaView style={backgroundStyle}>
67+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
68+
<ScrollView
69+
contentInsetAdjustmentBehavior="automatic"
70+
style={backgroundStyle}>
71+
<Header />
72+
<View
73+
style={{
74+
backgroundColor: isDarkMode ? Colors.black : Colors.white,
75+
}}>
76+
<Button
77+
title={'Pay with Razorpay'}
78+
onPress={() => {
79+
var options = {
80+
description: 'Credits towards consultation',
81+
image: 'https://i.imgur.com/3g7nmJC.png',
82+
currency: 'INR',
83+
key: 'rzp_test_1DP5mmOlF5G5ag', // Your api key
84+
amount: '5000',
85+
name: 'foo',
86+
prefill: {
87+
88+
contact: '9191919191',
89+
name: 'Razorpay Software',
90+
},
91+
theme: {color: '#F37254'},
92+
};
93+
RazorpayCheckout.open(options)
94+
.then(data => {
95+
// handle success
96+
alert(`Success: ${data.razorpay_payment_id}`);
97+
})
98+
.catch(error => {
99+
// handle failure
100+
alert(`Error: ${error.code} | ${error.description}`);
101+
});
102+
}}
103+
/>
104+
</View>
105+
</ScrollView>
106+
</SafeAreaView>
107+
);
108+
};
109+
110+
const styles = StyleSheet.create({
111+
sectionContainer: {
112+
marginTop: 32,
113+
paddingHorizontal: 24,
114+
},
115+
sectionTitle: {
116+
fontSize: 24,
117+
fontWeight: '600',
118+
},
119+
sectionDescription: {
120+
marginTop: 8,
121+
fontSize: 18,
122+
fontWeight: '400',
123+
},
124+
highlight: {
125+
fontWeight: '700',
126+
},
127+
});
128+
129+
export default App;

example/SampleApp/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby '2.7.4'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

0 commit comments

Comments
 (0)