-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shubham Garg
committed
Aug 10, 2021
1 parent
0db5d31
commit c7ae3b5
Showing
907 changed files
with
56,713 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
Samples/Common Files For Swift & ObjC/Storyboards/Base.lproj/LaunchScreen.storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="EHf-IW-A2E"> | ||
<objects> | ||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> | ||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="53" y="375"/> | ||
</scene> | ||
</scenes> | ||
</document> |
483 changes: 483 additions & 0 deletions
483
Samples/Common Files For Swift & ObjC/Storyboards/Base.lproj/Main.storyboard
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
Samples/Common Files For Swift & ObjC/Supporting Files/AppDelegate.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// AppDelegate.swift | ||
// PayUNativeOtpAssistSwiftSample | ||
// | ||
// Created by Shubham Garg on 14/06/21. | ||
// | ||
|
||
import UIKit | ||
import PayUNativeOtpAssist | ||
@UIApplicationMain | ||
class AppDelegate: UIResponder, UIApplicationDelegate { | ||
|
||
var window: UIWindow? | ||
|
||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
PayUOtpAssist.start() | ||
return true | ||
} | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
...iles For Swift & ObjC/Supporting Files/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
134 changes: 134 additions & 0 deletions
134
... Files For Swift & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"filename" : "ipad_settings29x29.png", | ||
"idiom" : "iphone", | ||
"scale" : "1x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "1x", | ||
"size" : "57x57" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "57x57" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"filename" : "ipad_notification20x20.png", | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"filename" : "Icon-40.png", | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"filename" : "ipad_settings29x29-1.png", | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"filename" : "ipad_app76x76.png", | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "83.5x83.5" | ||
}, | ||
{ | ||
"filename" : "iTunesArtwork.png", | ||
"idiom" : "ios-marketing", | ||
"scale" : "1x", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.75 KB
...or Swift & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/Icon-40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.98 KB
...Swift & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.49 KB
...Swift & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.7 KB
...ift & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+302 KB
...ft & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/iTunesArtwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.29 KB
...ft & ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/ipad_app76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.1 KB
...& ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+880 Bytes
.../Supporting Files/Assets.xcassets/AppIcon.appiconset/ipad_notification20x20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.09 KB
...pporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.38 KB
...jC/Supporting Files/Assets.xcassets/AppIcon.appiconset/ipad_settings29x29-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.38 KB
...ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/ipad_settings29x29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
...Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
...C/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.61 KB
...upporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.61 KB
.../Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.4 KB
...ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.8 KB
...ObjC/Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.29 KB
...Supporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.4 KB
...upporting Files/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
Samples/Common Files For Swift & ObjC/Supporting Files/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+53.5 KB
...n Files For Swift & ObjC/Supporting Files/Assets.xcassets/logo.imageset/AKR.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...ommon Files For Swift & ObjC/Supporting Files/Assets.xcassets/logo.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "AKR.jpg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Samples/Common Files For Swift & ObjC/Supporting Files/Constants/SampleAppConstants.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Constants.swift | ||
// PayUNativeOtpAssistSwiftSample | ||
// | ||
// Created by Amit Salaria on 25/06/21. | ||
// | ||
|
||
import Foundation | ||
|
||
@objc class SampleAppConstants: NSObject { | ||
@objc static let key = "key" | ||
@objc static let salt = "salt" | ||
@objc static let amount = "amount" | ||
@objc static let email = "email" | ||
@objc static let cardNumber = "cardNumber" | ||
@objc static let cardExpiryMonth = "cardExpiryMonth" | ||
@objc static let cardExpiryYear = "cardExpiryYear" | ||
@objc static let saveCard = "saveCard" | ||
@objc static let cardName = "cardName" | ||
@objc static let cvv = "cvv" | ||
@objc static let cardToken = "cardToken" | ||
@objc static let userCredential = "userCredential" | ||
@objc static let cardHash = "card_hash" | ||
@objc static let bankcode = "bankcode" | ||
|
||
} | ||
|
||
let kCardDetailsViewController = "CardDetailsViewController" |
53 changes: 53 additions & 0 deletions
53
Samples/Common Files For Swift & ObjC/Supporting Files/Custom Classes/Loader.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// Loader.swift | ||
// PayUNativeOtpAssistSwiftSample | ||
// | ||
// Created by Amit Salaria on 25/06/21. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
class Loader: UIView { | ||
|
||
static let shared: Loader = { | ||
let instance = Loader() | ||
return instance | ||
}() | ||
|
||
private let loader = UIActivityIndicatorView() | ||
|
||
private override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
prepared() | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
func prepared() { | ||
self.backgroundColor = UIColor.white.withAlphaComponent(0.5) | ||
self.frame = UIScreen.main.bounds | ||
loader.frame = UIScreen.main.bounds | ||
loader.style = .whiteLarge | ||
loader.center = self.center | ||
loader.color = .gray | ||
self.addSubview(loader) | ||
|
||
} | ||
|
||
func show() { | ||
let application = UIApplication.shared.delegate as! AppDelegate | ||
application.window?.addSubview(self) | ||
|
||
loader.startAnimating() | ||
loader.bringSubviewToFront((application.window?.rootViewController?.view)!) | ||
} | ||
|
||
func hide() { | ||
self.removeFromSuperview() | ||
loader.stopAnimating() | ||
} | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
Samples/Common Files For Swift & ObjC/Supporting Files/Custom Classes/SavedCardsAPI.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// SavedCards.swift | ||
// PayUNativeOtpAssistSwiftSample | ||
// | ||
// Created by Amit Salaria on 25/06/21. | ||
// | ||
|
||
import Foundation | ||
import PayUBizCoreKit | ||
|
||
struct StoredCard { | ||
var name: String! | ||
var number: String! | ||
var month: String! | ||
var year: String! | ||
var cvv: String? | ||
var token: String! | ||
var bin: String! | ||
var cardType: String! | ||
var customObj: Any? | ||
} | ||
|
||
class SavedCardsAPI { | ||
|
||
class func fetchAll(paymentParam: PayUModelPaymentParams, completion: @escaping (([StoredCard])->())) { | ||
|
||
PayUWebServiceResponse().getPayUPaymentRelatedDetail(forMobileSDK: paymentParam) { (paymentRelatedDetails, error, extraParam) in | ||
|
||
var paymentOptions = [StoredCard]() | ||
if let paymentRelatedDetails = paymentRelatedDetails { | ||
|
||
if (paymentRelatedDetails.availablePaymentOptionsArray.contains(PAYMENT_PG_STOREDCARD)) { | ||
for eachStoredCard in paymentRelatedDetails.storedCardArray { | ||
if let eachStoredCard = eachStoredCard as? PayUModelStoredCard { | ||
var savedCard = StoredCard() | ||
savedCard.number = eachStoredCard.cardNo | ||
savedCard.month = eachStoredCard.expiryMonth | ||
savedCard.year = eachStoredCard.expiryYear | ||
savedCard.name = eachStoredCard.nameOnCard | ||
savedCard.customObj = eachStoredCard | ||
savedCard.token = eachStoredCard.cardToken | ||
savedCard.bin = eachStoredCard.cardBin | ||
savedCard.cardType = eachStoredCard.cardType | ||
paymentOptions.append(savedCard) | ||
} | ||
} | ||
} | ||
} | ||
|
||
completion(paymentOptions) | ||
} | ||
} | ||
|
||
class func saveCard(paymentParam: PayUModelPaymentParams) { | ||
PayUWebServiceResponse().saveUserCard(paymentParam) { (storedCard, errorMessage, otherInfo) in | ||
print(storedCard, errorMessage, otherInfo) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.