Skip to content

Commit

Permalink
Merge pull request #15 from razorpay/ios_script
Browse files Browse the repository at this point in the history
iOS script changes
  • Loading branch information
pronav committed Mar 8, 2017
2 parents 857e506 + 7338a90 commit 8c8d7d0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ contributed to it.
Fork the repo.

1. Use the example project to test the module.
2. Change `"react-native-razorpay": ">=1.0.0"` in `package.json` of example to
`"react-native-razorpay": "./../"`.
2. Delete the `postinstall` step from `package.json`. Remember to revert this
change when commiting.
3. Edit example/reload.sh to configure your path.
4. Follow instructions to link your project with the iOS SDK, as given in the [README].
5. Run example/reload.sh every time you make a change to the module.
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ You can skip steps 1, 2 and 3 if you used `npm`.
`path/to/your/project/node_modules/react-native-razorpay/ios`.
4. Open `path/to/your/project/ios/<your_project>.xcworkspace` or
`path/to/your/project/ios/<your_project>.xcodeproj`
5. Also link the `.framework` file **_directly_ to your project** in Xcode. Check the
`Copy items if needed` box and select your project target from the list below.
5. Also link the `.framework` file **_directly_ to your project** in Xcode. You
can do this by simply dragging-and-dropping the `.framework` file into Xcode
under directory named `your_project`. Check the `Copy items if needed` box and
select your project target from the list below.
6. Add the following line of code in your `AppDelegate.m` under the imports section:
`#import <dlfcn.h>`
7. Add the following line of code in your `AppDelegate.m` inside the
Expand Down Expand Up @@ -93,7 +95,7 @@ and the `catch` part corresponds to payment failure.
}
RazorpayCheckout.open(options).then((data) => {
// handle success
alert(`Success: ${data.payment_id}`);
alert(`Success: ${data.razorpay_payment_id}`);
}).catch((error) => {
// handle failure
alert(`Error: ${error.code} | ${error.description}`);
Expand Down
4 changes: 2 additions & 2 deletions download_ios_framework.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
## Run this script after installing the module

curl -O http://downloads.razorpay.com/Razorpay.framework-0.14.1.zip
unzip ./Razorpay.framework-0.14.1.zip
curl -O http://downloads.razorpay.com/Razorpay.framework-0.15.0.zip
unzip ./Razorpay.framework-0.15.0.zip
rm -r ./ios/Razorpay.framework
cp -R ./Razorpay.framework ./ios/
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-razorpay",
"version": "1.1.0",
"version": "1.1.1",
"description": "React Native wrapper for Razorpay",
"main": "RazorpayCheckout.js",
"scripts": {
Expand All @@ -11,6 +11,12 @@
"type": "git",
"url": "git+https://github.com/razorpay/react-native-razorpay.git"
},
"dependencies": {
"react-native": "<0.40.0"
},
"peerDependencies": {
"react-native": "<0.40.0"
},
"keywords": [
"react-native",
"razorpay",
Expand Down

0 comments on commit 8c8d7d0

Please sign in to comment.