Skip to content

Commit ab81d51

Browse files
committed
Valid verve card number length can be 16-19
1 parent bf2a15a commit ab81d51

14 files changed

Lines changed: 208 additions & 149 deletions

File tree

Example/Default-568h@2x.png

-266 KB
Binary file not shown.

Example/Paystack iOS Example.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
042CA41F1A685E8D00D778E7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 042CA4171A685E8D00D778E7 /* Main.storyboard */; };
1212
042CA4201A685E8D00D778E7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 042CA4191A685E8D00D778E7 /* Images.xcassets */; };
1313
042CA4221A685E8D00D778E7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042CA41C1A685E8D00D778E7 /* ViewController.swift */; };
14-
10A653A71C88CFBC00EBC974 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 10A653A61C88CFBC00EBC974 /* Default-568h@2x.png */; };
1514
10DAC7941C896BB300855971 /* Paystack.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 10DAC7921C896BAC00855971 /* Paystack.framework */; };
1615
10DAC7951C896BB300855971 /* Paystack.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 10DAC7921C896BAC00855971 /* Paystack.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1716
10FC52021C88D40A004A0733 /* Paystack iOS Example.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 10FC52011C88D40A004A0733 /* Paystack iOS Example.entitlements */; };
@@ -49,7 +48,6 @@
4948
042CA41A1A685E8D00D778E7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5049
042CA41C1A685E8D00D778E7 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
5150
04823F781A6849200098400B /* Paystack iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Paystack iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
52-
10A653A61C88CFBC00EBC974 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
5351
10DAC7921C896BAC00855971 /* Paystack.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Paystack.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5452
10FC52011C88D40A004A0733 /* Paystack iOS Example.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Paystack iOS Example.entitlements"; sourceTree = "<group>"; };
5553
C11745D31C456C730029936F /* Paystack iOS Application Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Paystack iOS Application Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -93,7 +91,6 @@
9391
04823F6F1A6849200098400B = {
9492
isa = PBXGroup;
9593
children = (
96-
10A653A61C88CFBC00EBC974 /* Default-568h@2x.png */,
9794
042CA4131A685E8D00D778E7 /* Paystack iOS Example */,
9895
C11745D41C456C730029936F /* Paystack iOS Application Tests */,
9996
04823F9F1A6849850098400B /* Frameworks */,
@@ -230,7 +227,6 @@
230227
042CA4201A685E8D00D778E7 /* Images.xcassets in Resources */,
231228
042CA41F1A685E8D00D778E7 /* Main.storyboard in Resources */,
232229
10FC52021C88D40A004A0733 /* Paystack iOS Example.entitlements in Resources */,
233-
10A653A71C88CFBC00EBC974 /* Default-568h@2x.png in Resources */,
234230
);
235231
runOnlyForDeploymentPostprocessing = 0;
236232
};

Example/Paystack iOS Example/Base.lproj/Main.storyboard

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="caps" translatesAutoresizingMaskIntoConstraints="NO" id="VbY-Dc-i7d">
2626
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
2727
</imageView>
28-
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pay for a cap" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W8k-gN-iqf">
28+
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Charge ahead!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W8k-gN-iqf">
2929
<rect key="frame" x="26" y="37" width="268" height="21.5"/>
3030
<fontDescription key="fontDescription" type="system" pointSize="17"/>
3131
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -51,8 +51,8 @@
5151
<action selector="chargeCard:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="MyM-MF-CeH"/>
5252
</connections>
5353
</button>
54-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="succeeded: chargedsiuhdbbdbjshkdkdjhjnd,mmn cnmmcnjc" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hfe-wW-WzS">
55-
<rect key="frame" x="26" y="154" width="268" height="24"/>
54+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hfe-wW-WzS">
55+
<rect key="frame" x="26" y="154" width="268" height="0.0"/>
5656
<fontDescription key="fontDescription" type="system" pointSize="10"/>
5757
<nil key="textColor"/>
5858
<nil key="highlightedColor"/>
@@ -91,7 +91,7 @@
9191
</scene>
9292
</scenes>
9393
<resources>
94-
<image name="caps" width="640" height="426"/>
94+
<image name="caps" width="840" height="525"/>
9595
</resources>
9696
<simulatedMetricsContainer key="defaultSimulatedMetrics">
9797
<simulatedStatusBarMetrics key="statusBar"/>

Example/Paystack iOS Example/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
38
{
49
"idiom" : "iphone",
510
"size" : "20x20",

Example/Paystack iOS Example/Images.xcassets/caps.imageset/Contents.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"images" : [
33
{
44
"idiom" : "iphone",
5-
"filename" : "paystack-cap.jpg",
5+
"filename" : "article-0-1BE8490500000578-267_964x647-1.png",
66
"scale" : "1x"
77
},
88
{
99
"idiom" : "iphone",
10-
"filename" : "paystack-cap-1.jpg",
10+
"filename" : "article-0-1BE8490500000578-267_964x647.png",
1111
"scale" : "2x"
1212
},
1313
{
716 KB
Loading
716 KB
Loading
Binary file not shown.
Binary file not shown.

Example/Paystack iOS Example/ViewController.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,17 @@ class ViewController: UIViewController, PSTCKPaymentCardTextFieldDelegate {
8686
}
8787

8888
func outputOnLabel(str: String){
89-
if let former = tokenLabel.text {
90-
tokenLabel.text = former + "\n" + str
91-
} else {
92-
tokenLabel.text = str
89+
DispatchQueue.main.async {
90+
if let former = self.tokenLabel.text {
91+
self.tokenLabel.text = former + "\n" + str
92+
} else {
93+
self.tokenLabel.text = str
94+
}
9395
}
9496
}
9597

9698
func fetchAccessCodeAndChargeCard(){
9799
if let url = URL(string: backendURLString + "/new-access-code") {
98-
print(backendURLString + "/new-access-code");
99100
let session = URLSession(configuration: URLSessionConfiguration.default)
100101
self.outputOnLabel(str: "Requesting access code")
101102
self.chargeCardButton.isEnabled = false;

0 commit comments

Comments
 (0)