Skip to content

Commit cda35bc

Browse files
author
Franklin
committed
working example of merchant's cards ui with sdk 2.0 and cb 4.0
1 parent 88816bb commit cda35bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2003
-1706
lines changed

.idea/modules.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sample.iml Android-SDK-Sample-App.iml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="java-gradle" name="Java-Gradle">
55
<configuration>
66
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
77
</configuration>
88
</facet>
99
</component>
10-
<component name="NewModuleRootManager" inherit-compiler-output="false">
11-
<output url="file://$MODULE_DIR$/build/classes/main" />
12-
<output-test url="file://$MODULE_DIR$/build/classes/test" />
10+
<component name="NewModuleRootManager" inherit-compiler-output="true">
1311
<exclude-output />
1412
<content url="file://$MODULE_DIR$">
1513
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
-58.3 KB
Binary file not shown.

CustomBrowser/CustomBrowser.aar

310 KB
Binary file not shown.

CustomBrowser/CustomBrowser.iml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Android-SDK-Sample-App" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="android-gradle" name="Android-Gradle">
55
<configuration>

CustomBrowser/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configurations.create("default")
2-
artifacts.add("default", file('CustomBrowser-release.aar'))
2+
artifacts.add("default", file('CustomBrowser.aar'))

PayU/.gitignore

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
/build
2-
.DS_Store
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
.DS_Store
5+
build
6+
.idea/libraries
7+
bin

PayU/AndroidManifest.xml

-11
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,4 @@
66

77
<uses-permission android:name="android.permission.INTERNET" />
88

9-
<application android:allowBackup="true">
10-
<activity
11-
android:name=".PaymentOptionsActivity"
12-
android:configChanges="orientation|keyboard|screenSize">
13-
</activity>
14-
<activity
15-
android:name=".ProcessPaymentActivity"
16-
android:configChanges="orientation|keyboard|screenSize">
17-
</activity>
18-
</application>
19-
209
</manifest>

PayU/PayU.iml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Android-SDK-Sample-App" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="android-gradle" name="Android-Gradle">
55
<configuration>
@@ -9,6 +9,7 @@
99
<facet type="android" name="Android">
1010
<configuration>
1111
<option name="SELECTED_BUILD_VARIANT" value="debug" />
12+
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
1213
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
1314
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
1415
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
@@ -23,6 +24,7 @@
2324
</component>
2425
<component name="NewModuleRootManager" inherit-compiler-output="false">
2526
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
27+
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
2628
<exclude-output />
2729
<content url="file://$MODULE_DIR$">
2830
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />

PayU/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ android {
2727
}
2828

2929
dependencies {
30-
compile 'com.android.support:support-v4:21.0.3'
3130
// compile files('libs/CustomBrowser.aar')
3231
// compile(name:'CustomBrowser', ext:'aar')
33-
// compile project(':CustomBrowser')
32+
// compile project(':CustomBrowser')
33+
compile 'com.android.support:support-v4:21.0.3'
3434
compile project(':CustomBrowser')
3535
}

PayU/res/anim/face_out.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:interpolator="@android:anim/linear_interpolator">
4+
5+
<alpha
6+
android:fromAlpha="1.0"
7+
android:fillAfter="true"
8+
android:toAlpha="0.1"
9+
android:interpolator="@android:anim/accelerate_interpolator"
10+
android:duration="500"/>
11+
</set>

PayU/res/anim/fade_in.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:interpolator="@android:anim/linear_interpolator">
4+
5+
<alpha
6+
android:fromAlpha="0.1"
7+
android:fillAfter="true"
8+
android:toAlpha="1.0"
9+
android:interpolator="@android:anim/accelerate_interpolator"
10+
android:duration="500"/>
11+
</set>
1.59 KB
Loading

PayU/res/drawable-xxhdpi/nopoint.png

2.16 KB
Loading

PayU/res/drawable-xxhdpi/onepoint.png

2.4 KB
Loading
2.62 KB
Loading

PayU/res/drawable-xxhdpi/twopoint.png

2.52 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
3+
4+
<solid android:color="#59000000"></solid>
5+
<corners
6+
android:radius="0dp"/>
7+
8+
</shape>

PayU/res/drawable/button.xml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
android:bottomLeftRadius="10dp"
2020
android:topLeftRadius="10dp"
2121
android:topRightRadius="10dp"/>
22-
2322
</shape>
2423
</item>
2524
</selector>

PayU/res/drawable/error_box.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
3+
<item>
4+
<shape
5+
android:shape="rectangle">
6+
<stroke android:width="1dp" android:color="#FF0000" />
7+
<solid android:color="#FFF8C6C6"/>
8+
<padding
9+
android:right="5dp"
10+
android:left="5dp"
11+
android:bottom="5dp"
12+
android:top="5dp"/>
13+
</shape>
14+
</item>
15+
</layer-list>
-513 Bytes
Binary file not shown.

PayU/res/drawable/progress_dialog.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
3+
>
4+
<solid android:color="@android:color/white"/>
5+
6+
<stroke android:width="2dip" android:color="#000000"/>
7+
8+
</shape>

PayU/res/drawable/shape_progress.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:shape="rectangle">
5+
<solid
6+
android:width="1dp"
7+
android:color="#FFFFFF" />
8+
<corners android:radius="15dp" />
9+
<padding
10+
android:bottom="10dp"
11+
android:left="10dp"
12+
android:right="10dp"
13+
android:top="10dp" />
14+
</shape>

PayU/res/layout/activity_process_payment.xml

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@
99
android:visibility="gone"
1010
android:layout_alignParentBottom="true"
1111
android:layout_width="match_parent"
12-
android:layout_height="wrap_content" />
12+
android:layout_height="wrap_content"/>
1313

1414
<WebView
1515
android:id="@+id/webview"
1616
android:layout_above="@id/parent"
1717
android:layout_width="match_parent"
1818
android:layout_height="match_parent"/>
1919

20+
<LinearLayout
21+
android:layout_width="match_parent"
22+
android:id="@+id/trans_overlay"
23+
android:layout_height="match_parent"
24+
android:orientation="horizontal"
25+
android:background="@drawable/background_drawable">
26+
</LinearLayout>
2027
</RelativeLayout>

PayU/res/layout/card_details_layout.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
android:layout_width="match_parent"
1212
android:layout_height="wrap_content"
1313
android:id="@+id/enterCardDetailsTextView"
14-
android:layout_marginBottom="15dp"/>
14+
android:layout_marginBottom="15dp"
15+
android:text="Enter your card details."/>
1516

1617
<EditText
1718
android:layout_width="match_parent"

PayU/res/layout/fragment_debit_card_details.xml PayU/res/layout/fragment_cards.xml

+13-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@
33
android:layout_width="match_parent"
44
android:layout_height="match_parent"
55
android:orientation="vertical"
6-
tools:context="com.payu.sdk.fragments.CreditCardDetailsFragment">
6+
tools:context="com.payu.sdk.fragments.CardFragment">
77

88
<LinearLayout
99
android:layout_width="match_parent"
1010
android:layout_height="wrap_content"
1111
android:orientation="vertical">
1212

13+
<TextView
14+
android:layout_width="match_parent"
15+
android:layout_height="wrap_content"
16+
android:id="@+id/issuerDownTextView"
17+
android:textColor="#FF0000"
18+
android:layout_gravity="center"
19+
android:gravity="center"
20+
android:layout_margin="10dp"
21+
android:background="@drawable/error_box"
22+
android:visibility="gone"/>
23+
1324
<include layout="@layout/card_details_layout"/>
1425

1526
<LinearLayout
@@ -56,11 +67,10 @@
5667
android:layout_width="wrap_content"
5768
android:layout_height="wrap_content"
5869
android:id="@+id/dontHaveCvvAndExpiryTextView"
59-
android:text="@string/if_cvv_and_expiry_on_card"/>
70+
android:text="@string/if_dont_cvv_and_expiry_on_card"/>
6071

6172
</LinearLayout>
6273

63-
6474
<Button
6575
android:layout_width="match_parent"
6676
android:layout_height="wrap_content"

PayU/res/layout/fragment_credit_card_details.xml

-32
This file was deleted.

PayU/res/layout/fragment_emi_details.xml

+15
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@
3232

3333
<include layout="@layout/card_details_layout"></include>
3434

35+
<!-- Emi
36+
<TextView
37+
android:layout_width="match_parent"
38+
android:layout_height="wrap_content"
39+
android:id="@+id/issuerDownTextView"
40+
android:textColor="#FF0000"
41+
android:layout_gravity="center"
42+
android:gravity="center"
43+
android:layout_margin="5dp"
44+
android:text="It seems your issuing bank is down. please try later."
45+
android:background="@drawable/error_box"
46+
android:visibility="visible"/>
47+
-->
48+
49+
3550
<Button
3651
android:layout_width="match_parent"
3752
android:layout_height="wrap_content"

PayU/res/layout/fragment_net_banking.xml

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
android:layout_margin="10dp"
1818
android:id="@+id/netBankingSpinner"/>
1919

20+
<TextView
21+
android:id="@+id/netBankingErrorText"
22+
android:layout_width="match_parent"
23+
android:layout_height="wrap_content"
24+
android:layout_margin="10dp"
25+
android:textColor="#FF0000"
26+
android:textSize="11dp"
27+
android:gravity="center_horizontal"
28+
android:textAlignment="gravity"
29+
android:background="@drawable/error_box"
30+
android:visibility="gone"/>
31+
2032
<TextView
2133
android:layout_width="match_parent"
2234
android:layout_height="wrap_content"

PayU/res/layout/prog_dialog.xml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="fill_parent"
4+
android:layout_height="fill_parent" >
5+
6+
<LinearLayout
7+
android:background="@drawable/shape_progress"
8+
android:layout_width="fill_parent"
9+
android:layout_height="wrap_content"
10+
android:layout_marginLeft="30dp"
11+
android:layout_marginRight="30dp"
12+
android:layout_centerInParent="true"
13+
android:paddingTop="30dp"
14+
android:paddingBottom="30dp"
15+
android:gravity="center_horizontal"
16+
17+
android:orientation="vertical" >
18+
19+
<ImageView
20+
android:src="@drawable/nopoint"
21+
android:paddingTop="10dp"
22+
android:id="@+id/imageView"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:scaleType="centerInside"
26+
/>
27+
28+
<TextView
29+
android:paddingTop="30dp"
30+
android:layout_height="wrap_content"
31+
android:layout_width="wrap_content"
32+
android:textSize="20dp"
33+
android:layout_gravity="center_horizontal"
34+
android:textStyle="normal"
35+
android:text="@string/process_your_request">
36+
</TextView>
37+
<TextView
38+
android:paddingTop="10dp"
39+
android:layout_height="wrap_content"
40+
android:textStyle="italic"
41+
android:textSize="15dp"
42+
android:layout_width="wrap_content"
43+
android:text="@string/please_wait"
44+
android:id="@+id/please_wait">
45+
</TextView>
46+
47+
48+
</LinearLayout>
49+
50+
</RelativeLayout>

0 commit comments

Comments
 (0)