skipcash-reactnative 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/ios/SkipcashReactnative.swift +9 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,6 +138,7 @@ export default function App() {
|
|
|
138
138
|
paymentData.setAmount(amount); // required
|
|
139
139
|
paymentData.setTransactionId(""); // your internal order id, (Optional) - but very much recommended
|
|
140
140
|
paymentData.setWebhookUrl(""); // very much recommended
|
|
141
|
+
// read about webhooks -> https://dev.skipcash.app/doc/api-integration/web-hooks/
|
|
141
142
|
paymentData.setMerchantName(""); /*
|
|
142
143
|
Required - (if using in-app apple-pay set your official merchant/business name for apple payment sheet)
|
|
143
144
|
this is required by apple, it must match your official name in appstore
|
|
@@ -167,8 +168,8 @@ export default function App() {
|
|
|
167
168
|
(it should be uniquely generated each time the function called).
|
|
168
169
|
*/
|
|
169
170
|
paymentData.setPaymentModalTitle("Checkout") // WEB VIEW SCREEN TITLE
|
|
170
|
-
paymentData.setWebhookUrl("
|
|
171
|
-
paymentData.setReturnUrl("
|
|
171
|
+
paymentData.setWebhookUrl(""); // very much recommended
|
|
172
|
+
paymentData.setReturnUrl("") // required
|
|
172
173
|
|
|
173
174
|
// below are some options used to adjust the WEBVIEW SCREEN header
|
|
174
175
|
/*
|
|
@@ -10,6 +10,10 @@ import CryptoKit
|
|
|
10
10
|
import CommonCrypto
|
|
11
11
|
import PassKit
|
|
12
12
|
import WebKit
|
|
13
|
+
import Network
|
|
14
|
+
import SystemConfiguration.CaptiveNetwork
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
|
|
14
18
|
public struct ResultObject: Codable {
|
|
15
19
|
public var isSuccess: Bool
|
|
@@ -67,9 +71,10 @@ import WebKit
|
|
|
67
71
|
public class SetupVC: UIViewController {
|
|
68
72
|
let production = "https://api.skipcash.app"
|
|
69
73
|
let sandboxUrl = "https://skipcashtest.azurewebsites.net"
|
|
74
|
+
let uat = "https://skipcash-uat-api.azurewebsites.net"
|
|
70
75
|
|
|
71
|
-
public var paymentToken: String
|
|
72
|
-
public var paymentID: String
|
|
76
|
+
public var paymentToken: String = ""
|
|
77
|
+
public var paymentID: String = ""
|
|
73
78
|
public var transactionID: String = ""
|
|
74
79
|
public var delegate:ApplePayReponseDelegate?
|
|
75
80
|
public var completion: ((PKPaymentAuthorizationResult) -> Void)?
|
|
@@ -79,8 +84,8 @@ import WebKit
|
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
func callApplePay(paymentId: String, applePaymentToken: String) {
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
let request = "{\"token\": {\"paymentData\":\(applePaymentToken)}, \"ip\": \"178.152.136.90\"}"
|
|
88
|
+
// let request = "{\"token\": {\"paymentData\":\(applePaymentToken)}, \"ip\": ""}"
|
|
84
89
|
let postData = request.data(using: .utf8)
|
|
85
90
|
let url = URL(string: production + "/api/v1/payments/apple/" + paymentId + "/pay-mc")!
|
|
86
91
|
var urlRequest = URLRequest(url: url)
|