Skip to content

Commit 94b8f76

Browse files
Payfast RN 2.2.0 (#79)
1 parent 14d2caf commit 94b8f76

34 files changed

+250
-338
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ dependencies {
6666
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
6767
implementation 'androidx.gridlayout:gridlayout:1.0.0'
6868

69-
implementation 'com.cashfree.pg:api:2.1.26'
69+
implementation 'com.cashfree.pg:api:2.2.0'
7070

7171
implementation "com.facebook.react:react-native:+" // From node_modules
7272
}

example/Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '>= 2.6.10'
5-
6-
gem 'cocoapods', '>= 1.11.3'
4+
ruby '3.2.1'
5+
gem 'cocoapods', '~> 1.13'
6+
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

example/Gemfile.lock

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ GEM
1616
json (>= 1.5.1)
1717
atomos (0.1.3)
1818
claide (1.1.0)
19-
cocoapods (1.12.1)
19+
cocoapods (1.16.2)
2020
addressable (~> 2.8)
2121
claide (>= 1.0.2, < 2.0)
22-
cocoapods-core (= 1.12.1)
22+
cocoapods-core (= 1.16.2)
2323
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24-
cocoapods-downloader (>= 1.6.0, < 2.0)
24+
cocoapods-downloader (>= 2.1, < 3.0)
2525
cocoapods-plugins (>= 1.0.0, < 2.0)
2626
cocoapods-search (>= 1.0.0, < 2.0)
2727
cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -33,8 +33,8 @@ GEM
3333
molinillo (~> 0.8.0)
3434
nap (~> 1.0)
3535
ruby-macho (>= 2.3.0, < 3.0)
36-
xcodeproj (>= 1.21.0, < 2.0)
37-
cocoapods-core (1.12.1)
36+
xcodeproj (>= 1.27.0, < 2.0)
37+
cocoapods-core (1.16.2)
3838
activesupport (>= 5.0, < 8)
3939
addressable (~> 2.8)
4040
algoliasearch (~> 1.0)
@@ -45,7 +45,7 @@ GEM
4545
public_suffix (~> 4.0)
4646
typhoeus (~> 1.0)
4747
cocoapods-deintegrate (1.0.5)
48-
cocoapods-downloader (1.6.3)
48+
cocoapods-downloader (2.1)
4949
cocoapods-plugins (1.0.0)
5050
nap
5151
cocoapods-search (1.0.1)
@@ -68,33 +68,34 @@ GEM
6868
json (2.6.3)
6969
minitest (5.18.0)
7070
molinillo (0.8.0)
71-
nanaimo (0.3.0)
71+
nanaimo (0.4.0)
7272
nap (1.1.0)
7373
netrc (0.11.0)
7474
public_suffix (4.0.7)
75-
rexml (3.2.5)
75+
rexml (3.4.1)
7676
ruby-macho (2.5.1)
7777
typhoeus (1.4.0)
7878
ethon (>= 0.9.0)
7979
tzinfo (2.0.6)
8080
concurrent-ruby (~> 1.0)
81-
xcodeproj (1.22.0)
81+
xcodeproj (1.27.0)
8282
CFPropertyList (>= 2.3.3, < 4.0)
8383
atomos (~> 0.1.3)
8484
claide (>= 1.0.2, < 2.0)
8585
colored2 (~> 3.1)
86-
nanaimo (~> 0.3.0)
87-
rexml (~> 3.2.4)
86+
nanaimo (~> 0.4.0)
87+
rexml (>= 3.3.6, < 4.0)
8888
zeitwerk (2.6.7)
8989

9090
PLATFORMS
9191
ruby
9292

9393
DEPENDENCIES
94-
cocoapods (>= 1.11.3)
94+
activesupport (>= 6.1.7.3, < 7.1.0)
95+
cocoapods (~> 1.13)
9596

9697
RUBY VERSION
97-
ruby 2.6.10p210
98+
ruby 3.2.1p31
9899

99100
BUNDLED WITH
100-
1.17.2
101+
2.6.6

example/android/app/build.gradle

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

45
import com.android.build.OutputFile
@@ -151,15 +152,9 @@ android {
151152
dependencies {
152153
// The version of react-native is set by the React Native Gradle Plugin
153154
implementation("com.facebook.react:react-android")
155+
implementation("com.facebook.react:flipper-integration")
154156

155157
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
156-
157-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
158-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
159-
exclude group:'com.squareup.okhttp3', module:'okhttp'
160-
}
161-
162-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
163158
if (hermesEnabled.toBoolean()) {
164159
implementation("com.facebook.react:hermes-android")
165160
} else {

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@
88
android:usesCleartextTraffic="true"
99
tools:targetApi="28"
1010
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
1211
</application>
1312
</manifest>

example/android/app/src/debug/java/com/cashfreepgapiexample/ReactNativeFlipper.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

example/android/app/src/main/java/com/cashfree/pg/demoapp/MainActivity.java

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.cashfree.pg.demoapp;
2+
3+
import com.facebook.react.ReactActivity;
4+
import com.facebook.react.ReactActivityDelegate;
5+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled;
6+
import com.facebook.react.defaults.DefaultReactActivityDelegate;
7+
8+
class MainActivity : ReactActivity() {
9+
10+
/**
11+
* Returns the name of the main component registered from JavaScript. This is used to schedule
12+
* rendering of the component.
13+
*/
14+
override fun getMainComponentName(): String = "CashfreePgApiExample"
15+
16+
/**
17+
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
18+
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
19+
* (aka React 18) with two boolean flags.
20+
*/
21+
22+
override fun createReactActivityDelegate(): ReactActivityDelegate =
23+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
24+
}

example/android/app/src/main/java/com/cashfree/pg/demoapp/MainApplication.java

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.cashfree.pg.demoapp
2+
3+
import android.app.Application
4+
5+
import com.facebook.react.PackageList
6+
import com.facebook.react.ReactApplication
7+
import com.facebook.react.ReactHost
8+
import com.facebook.react.ReactNativeHost
9+
import com.facebook.react.ReactPackage
10+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
11+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
12+
import com.facebook.react.defaults.DefaultReactNativeHost
13+
import com.facebook.react.flipper.ReactNativeFlipper
14+
import com.facebook.soloader.SoLoader
15+
16+
class MainApplication : Application(), ReactApplication {
17+
18+
override val reactNativeHost: ReactNativeHost =
19+
object : DefaultReactNativeHost(this) {
20+
override fun getPackages(): List<ReactPackage> {
21+
return PackageList(this).packages
22+
}
23+
24+
override fun getJSMainModuleName(): String = "index"
25+
26+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
27+
28+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
29+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
30+
}
31+
32+
override val reactHost: ReactHost
33+
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
34+
35+
override fun onCreate() {
36+
super.onCreate()
37+
SoLoader.init(this, false)
38+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
39+
load()
40+
}
41+
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
42+
}
43+
}

0 commit comments

Comments
 (0)