( ! ) Warning: Declaration of Jetpack_IXR_Client::query() should be compatible with IXR_Client::query(...$args) in C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php on line 0 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3116 | 9235296 | rest_get_server( ) | ...\rest-api.php:403 |
11 | 0.3116 | 9238232 | do_action( ) | ...\rest-api.php:577 |
12 | 0.3116 | 9238608 | WP_Hook->do_action( ) | ...\plugin.php:517 |
13 | 0.3116 | 9238608 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
14 | 0.3128 | 9277808 | Jetpack_Core_Json_Api_Endpoints::register_endpoints( ) | ...\class-wp-hook.php:308 |
15 | 0.3130 | 9285800 | Jetpack::load_xml_rpc_client( ) | ...\class.core-rest-api-endpoints.php:64 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3873 | 11025792 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:310 |
12 | 0.3873 | 11026120 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3888 | 11025736 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:311 |
12 | 0.3888 | 11026056 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3906 | 11025928 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:315 |
12 | 0.3906 | 11026296 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3921 | 11025816 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:323 |
12 | 0.3921 | 11026136 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3934 | 11025880 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:335 |
12 | 0.3934 | 11026248 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3949 | 11025928 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:359 |
12 | 0.3949 | 11026296 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.4523 | 11307592 | WP_REST_Server->send_headers( ) | ...\class-wp-rest-server.php:459 |
12 | 0.4523 | 11307592 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:1780 |
13 | 0.4523 | 11308232 | header ( ) | ...\class-wp-rest-server.php:1768 |
( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64_2\www\docbase\wp-content\plugins\jetpack\class.jetpack-ixr-client.php:0) in C:\wamp64_2\www\docbase\wp-includes\rest-api\class-wp-rest-server.php on line 1768 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0003 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.3109 | 9207536 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.3109 | 9207560 | WP->main( ) | ...\functions.php:1334 |
5 | 0.3110 | 9207560 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.3116 | 9234248 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.3116 | 9234248 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.3116 | 9234248 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.3116 | 9235264 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.3872 | 11026136 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.4523 | 11307592 | WP_REST_Server->send_headers( ) | ...\class-wp-rest-server.php:459 |
12 | 0.4540 | 11307592 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:1780 |
13 | 0.4540 | 11307912 | header ( ) | ...\class-wp-rest-server.php:1768 |
Interswitch payment SDK allows you to accept payments from customers within your mobile application.\u00a0Please Note:\u00a0The current supported currency is naira (NGN), support for other currencies would be added later<\/em><\/strong>\u00a0The first step to using the Android SDK is to register as a merchant. This is described [here] (merchantxuat.interswitchng.com)<\/p>\n Download the latest SDK from the link below<\/p>\n https:\/\/github.com\/techquest\/isw-payment-sdk-android\/releases<\/a><\/p>\n It consists of a library:<\/p>\n Use Android Studio\u2019s dependency management tool (Gradle) to add the library to your project.<\/strong><\/p>\n During development of your app, you should use the SDK in sandbox mode to enable testing. Different Client Id and Client Secret are provided for Production and Sandbox mode. The procedure to use the SDK on sandbox mode is just as easy:<\/p>\n <\/a><\/p>\n Note: Supply your Client Id and Client Secret you got after registering as a Merchant\u00a0Please Note:\u00a0If you are providing your own transaction reference number, ensure you use the other PayWithCard constructor that accept transaction reference number<\/em><\/strong><\/p>\n <\/a><\/p>\n <\/a><\/p>\n <\/a><\/p>\n Note: Supply your Client Id and Client Secret you got after registering as a Merchant\u00a0Please Note:\u00a0If you are providing your own transaction reference number, ensure you use the other PayWithCard constructor that accept transaction reference number<\/em><\/strong><\/p>\n <\/a><\/p>\n <\/a><\/p>\n Note: * Supply your Client Id and Client Secret you got after registering as a Merchant\u00a0Please Note:\u00a0If you are providing your own transaction reference number, ensure you use the other ValidateCard constructor that accept transaction reference number<\/em><\/strong>\u00a0Please Note:\u00a0Balance is not returned for VISA Card<\/em><\/strong><\/p>\n Note: Supply your Client Id and Client Secret you got after registering as a Merchant\u00a0Please Note:\u00a0If you are providing your own transaction reference number, ensure you use the other PayWithToken constructor that accept transaction reference number<\/em><\/strong><\/p>\n Note: Supply your Client Id and Client Secret you got after registering as a Merchant<\/p>\n Note: Supply your Client Id and Client Secret you got after registering as a Merchant\u00a0Please Note:\u00a0Balance is not returned for VISA Card<\/em><\/strong><\/p>\n To check the status of a payment made, use the code below<\/p>\n<\/a><\/a>Download the latest SDK<\/h3>\n
\n
<\/a><\/a>Creating a Project and Adding Library Using Android Studio<\/h3>\n
\n
repositories {\r\n maven {\r\n url 'http:\/\/dl.bintray.com\/techquest\/maven-repo'\r\n }\r\n}\r\ndependencies {\r\n compile fileTree(dir: 'libs', include: ['*.jar'])\r\n testCompile 'junit:junit:4.12'\r\n compile 'com.android.support:appcompat-v7:25.1.0'\r\n compile 'com.android.support:design:25.1.0'\r\n compile 'com.interswitchng:payment-android:1.0.7'\r\n compile(name: 'deviceprint-release-2.2.0', ext: 'aar')\r\n}<\/pre>\n<\/div>\n
\n
<\/a><\/a>Using The SDK in Sandbox Mode<\/h3>\n
\n
Passport.overrideApiBase(Passport.SANDBOX_API_BASE); \r\nPayment.overrideApiBase(Payment.SANDBOX_API_BASE);<\/pre>\n<\/div>\n
\n
<\/a><\/a>Using the SDK with UI (In PCI-DSS Scope: No )<\/h2>\n
<\/a><\/a>Pay with Card<\/h3>\n
\n
\/\/Create a concrete implementation of IswCallback\r\n public class PaymentCallback extends IswCallback<PurchaseResponse> {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle error.\r\n \/\/ Payment not successful.\r\n }\r\n\r\n @Override\r\n public void onSuccess(PurchaseResponse response) {\r\n \/* Handle success.\r\n Payment successful. The response object contains fields transactionIdentifier,\r\n message, amount, token, tokenExpiryDate, panLast4Digits, transactionRef and cardType.\r\n Save the token, tokenExpiryDate, cardType and panLast4Digits\r\n in order to pay with the token in the future.\r\n *\/\r\n }\r\n }\r\n PaymentCallback paymentCallback = new PaymentCallback();\r\n RequestOptions options = RequestOptions.builder()\r\n .setClientId(\"IKIA335B188FDC3527EDB1E9300D35F6C51826DFC8A5\")\r\n .setClientSecret(\"4HOFYiMJitFQeHYUCH\/pvTF6jpiIaZqzVKB\/pheK4Cs=\")\r\n .build();\r\n Pay pay = new Pay(activity, customerId, paymentDescription, amount, currency, options, paymentCallback);\r\n pay.start();<\/pre>\n<\/div>\n
<\/a><\/a><\/a>Pay with Card<\/h3>\n
\n
\/\/Create a concrete implementation of IswCallback\r\n public class PaymentCallback extends IswCallback<PurchaseResponse> {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle error.\r\n \/\/ Payment not successful.\r\n }\r\n\r\n @Override\r\n public void onSuccess(PurchaseResponse response) {\r\n \/* Handle success.\r\n Payment successful. The response object contains fields transactionIdentifier,\r\n message, amount, token, tokenExpiryDate, panLast4Digits, transactionRef and cardType.\r\n Save the token, tokenExpiryDate, cardType and panLast4Digits\r\n in order to pay with the token in the future.\r\n *\/\r\n }\r\n }\r\n PaymentCallback paymentCallback = new PaymentCallback();\r\n RequestOptions options = RequestOptions.builder()\r\n .setClientId(\"IKIA14BAEA0842CE16CA7F9FED619D3ED62A54239276\")\r\n .setClientSecret(\"Z3HnVfCEadBLZ8SYuFvIQG52E472V3BQLh4XDKmgM2A=\")\r\n .build();\r\n PayWithCard payWithCard = new PayWithCard(activity, customerId, paymentDescription, amount,\r\n currency, options, paymentCallback);\r\n payWithCard.start();<\/pre>\n<\/div>\n
<\/a><\/a><\/a><\/h3>\n
<\/a><\/a><\/a>Validate Card<\/h3>\n
\n
\/\/Create a concrete implementation of IswCallback\r\n public class ValidateCardCallback extends IswCallback<ValidateCardResponse> {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle error.\r\n \/\/ Card validation not successful\r\n }\r\n\r\n @Override\r\n public void onSuccess(ValidateCardResponse response) {\r\n \/* Handle success.\r\n Card validation successful. The response object contains fields token, tokenExpiryDate\r\n panLast4Digits, transactionRef, balance and cardType. Save the token, tokenExpiryDate, cardType\r\n and panLast4Digits in order to pay with the token in the future.\r\n *\/\r\n }\r\n }\r\n ValidateCardCallback validateCardCallback = new ValidateCardCallback();\r\n RequestOptions options = RequestOptions.builder()\r\n .setClientId(\"IKIAD6DC1B942D95035FBCC5A4449C893D36536B5D54\")\r\n .setClientSecret(\"X1u1M6UNyASzslufiyxZnLb3u78TYODVnbRi7OxLNew=\")\r\n .build();\r\n ValidateCard validateCard = new ValidateCard(activity, customerId, options, validateCardCallback);\r\n validateCard.start();<\/pre>\n<\/div>\n
<\/h3>\n
<\/a><\/a>Pay with Token<\/h3>\n
\n
\/\/Create a concrete implementation of IswCallback\r\n public class PaymentCallback extends IswCallback<PurchaseResponse> {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle error.\r\n \/\/ Payment not successful.\r\n }\r\n\r\n @Override\r\n public void onSuccess(PurchaseResponse response) {\r\n \/* Handle success.\r\n Payment successful. The response object contains fields transactionIdentifier,\r\n message, amount, token, tokenExpiryDate, panLast4Digits, transactionRef and cardType.\r\n Save the token, tokenExpiryDate, cardType and panLast4Digits\r\n in order to pay with the token in the future.\r\n *\/\r\n }\r\n }\r\n PaymentCallback paymentCallback = new PaymentCallback();\r\n RequestOptions options = RequestOptions.builder()\r\n .setClientId(\"IKIAD6DC1B942D95035FBCC5A4449C893D36536B5D54\")\r\n .setClientSecret(\"X1u1M6UNyASzslufiyxZnLb3u78TYODVnbRi7OxLNew=\")\r\n .build();\r\n PayWithToken payWithToken = new PayWithToken(activity, customerId, amount, token, expiryDate, currency,\r\n cardType panLast4Digits, paymentDescription, options, paymentCallback);\r\n payWithToken.start();<\/pre>\n<\/div>\n
<\/h2>\n
<\/a><\/a>Using the SDK without UI (In PCI-DSS Scope: Yes)<\/h2>\n
<\/a><\/a>Pay with Card\/Token<\/h3>\n
\n
RequestOptions options = RequestOptions.builder()\r\n .setClientId(\"IKIA3E267D5C80A52167A581BBA04980CA64E7B2E70E\")\r\n .setClientSecret(\"SagfgnYsmvAdmFuR24sKzMg7HWPmeh67phDNIiZxpIY=\")\r\n .build();\r\n PurchaseRequest request = new PurchaseRequest(); \/\/ Setup request parameters\r\n request.setCustomerId(\"1234567890\"); \/\/ Optional email, mobile no, BVN etc to uniquely identify the customer.\r\n request.setAmount(\"100\"); \/\/ Amount in Naira\r\n request.setCurrency(\"NGN\"); \/\/ ISO Currency code\r\n request.setPan(\"5060100000000000012\"); \/\/Card No or Token\r\n request.setPinData(\"1111\"); \/\/ Optional Card PIN for card payment\r\n request.setExpiryDate(\"2004\"); \/\/ Card or Token expiry date in YYMM format\r\n request.setRequestorId(\"11179920172\"); \/\/ Requestor Identifier \r\n request.setCvv2(\"111\");\r\n request.setTransactionRef(RandomString.numeric(12)); \/\/ Generate a unique transaction reference.\r\n Context context = this; \/\/ Reference to your Android Activity\r\n\r\n new PaymentSDK(context, options).purchase(request, new IswCallback<PurchaseResponse>() { \r\n \/\/Send payment\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle error and notify the user.\r\n \/\/ Payment not successful.\r\n }\r\n\r\n @Override\r\n public void onSuccess(PurchaseResponse response) {\r\n \/\/ Check if OTP is required.\r\n if (StringUtils.hasText(response.getResponseCode())) { \r\n if (PaymentSDK.SAFE_TOKEN_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n \/\/ OTP required, ask user for OTP and authorize transaction\r\n \/\/ See how to authorize transaction with OTP below.\r\n }\r\n else if (PaymentSDK.CARDINAL_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n \/\/ redirect user to cardinal authorization page\r\n \/\/ See how to authorize transaction with Cardinal below.\r\n } \r\n }\r\n else {\r\n \/\/ OTP not required.\r\n \/\/ Handle and notify user of successful transaction. \r\n \/\/ A token for the card details is returned in the response.\r\n }\r\n \/\/ The response object contains fields transactionIdentifier, message, \r\n \/\/ amount, token, tokenExpiryDate, panLast4Digits, otpTransactionIdentifier, \r\n \/\/ transactionRef and cardType. Save the token, tokenExpiryDate, cardType and \r\n \/\/ panLast4Digits in order to pay with the token in the future.\r\n }\r\n });<\/pre>\n<\/div>\n
<\/h3>\n
<\/a><\/a>Validate Card and Get Token<\/h3>\n
\n
RequestOptions options = RequestOptions.builder()\r\n .setClientId(\"IKIA3E267D5C80A52167A581BBA04980CA64E7B2E70E\")\r\n .setClientSecret(\"SagfgnYsmvAdmFuR24sKzMg7HWPmeh67phDNIiZxpIY=\")\r\n .build();\r\n ValidateCardRequest request = new ValidateCardRequest(); \/\/ Setup request parameters\r\n request.setCustomerId(\"1234567890\"); \/\/ Optional email, mobile no, BVN etc to uniquely identify the customer.\r\n request.setPan(\"5060100000000000012\"); \/\/Card No or Token\r\n request.setPinData(\"1111\"); \/\/ Optional Card PIN for card payment\r\n request.setExpiryDate(\"2004\"); \/\/ Card or Token expiry date in YYMM format\r\n request.setCvv2(\"111\"); \/\/ Card Verification Value\r\n request.setTransactionRef(RandomString.numeric(12)); \/\/ Generate a unique transaction reference.\r\n Context context = this; \/\/ Reference to your Android Activity.\r\n new PaymentSDK(context, options).validateCard(request, new IswCallback<ValidateCardResponse>() { \r\n \/\/Send payment\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle error and notify the user.\r\n \/\/ Payment not successful.\r\n }\r\n\r\n @Override\r\n public void onSuccess(ValidateCardResponse response) {\r\n \/\/ Check if OTP is required.\r\n if (StringUtils.hasText(response.getResponseCode())) { \r\n if (PaymentSDK.SAFE_TOKEN_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n \/\/ OTP required, ask user for OTP and authorize transaction\r\n \/\/ See how to authorize transaction with OTP below.\r\n }\r\n else if (PaymentSDK.CARDINAL_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n \/\/ redirect user to cardinal authorization page\r\n \/\/ See how to authorize transaction with Cardinal below.\r\n } \r\n }\r\n else {\r\n \/\/ OTP not required.\r\n \/\/ Handle and notify user of successful transaction. \r\n \/\/ A token for the card details is returned in the response.\r\n }\r\n \/\/ The response object contains fields transactionIdentifier, \r\n \/\/ message,token, tokenExpiryDate, panLast4Digits, otpTransactionIdentifier\r\n \/\/ transactionRef and cardType. \r\n \/\/ Save the token, tokenExpiryDate, cardType and panLast4Digits \r\n \/\/ in order to pay with the token in the future.\r\n }\r\n });<\/pre>\n<\/div>\n
<\/a><\/a>Authorize PayWithCard using OTP<\/h2>\n
if (StringUtils.hasText(response.getResponseCode())) { \/\/ \r\n if (PaymentSDK.SAFE_TOKEN_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n AuthorizePurchaseRequest request = new AuthorizePurchaseRequest();\r\n request.setPaymentId(response.getPaymentId()); \/\/ Set the payment identifier for the request\r\n request.setAuthData(request.getAuthData()); \/\/ Set the request Auth Data\r\n request.setOtp(\"123456\"); \/\/ Accept OTP from user\r\n new PaymentSDK(context, options)\r\n .authorizePurchase(request, new IswCallback<AuthorizePurchaseResponse>() {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n @Override\r\n public void onSuccess(AuthorizePurchaseResponse otpResponse) {\r\n \/\/Handle and notify user of successful transaction\r\n }\r\n });\r\n }\r\n if (PaymentSDK.CARDINAL_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n \/\/ Create WebView to process the Authorize purchase request\r\n webView = new AuthorizeWebView(context, response) {\r\n @Override\r\n public void onPageDone() { \r\n AuthorizePurchaseRequest request = new AuthorizePurchaseRequest();\r\n request.setAuthData(request.getAuthData()); \/\/ Set the request Auth Data.\r\n request.setPaymentId(response.getPaymentId()); \/\/ Set the payment identifier for the request.\r\n request.setTransactionId(response.getTransactionId()); \/\/ Set payment identifier for the request.\r\n request.setEciFlag(response.getEciFlag()); \/\/ Set the Electronic Commerce Indicator (ECI).\r\n new PaymentSDK(context, options)\r\n .authorizePurchase(request, new IswCallback<AuthorizePurchaseResponse>() {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n @Override\r\n public void onSuccess(AuthorizePurchaseResponse response) {\r\n \/\/Handle and notify user of successful transaction\r\n }\r\n });\r\n }\r\n @Override\r\n public void onPageError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n };\r\n \/\/ Other webview customizations goes here e.g.\r\n webView.requestFocus(View.FOCUS_DOWN);\r\n webView.getSettings().setJavaScriptEnabled(true);\r\n webView.setVerticalScrollBarEnabled(true);\r\n }\r\n}<\/pre>\n<\/div>\n
<\/a><\/a>Authorize Card Validation using OTP<\/h2>\n
if (StringUtils.hasText(response.getResponseCode())) { \/\/ \r\n if (PaymentSDK.SAFE_TOKEN_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n AuthorizeCardRequest request = new AuthorizeCardRequest();\r\n request.setTransactionRef(response.getTransactionRef()); \/\/ Set the transaction reference for the request\r\n request.setAuthData(request.getAuthData()); \/\/ Set the request Auth Data\r\n request.setOtp(\"123456\"); \/\/ Accept OTP from user\r\n new PaymentSDK(context, options)\r\n .authorizeCard(request, new IswCallback<AuthorizeCardResponse>() {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n @Override\r\n public void onSuccess(AuthorizeCardResponse authorizeCardResponse) {\r\n \/\/Handle and notify user of successful transaction\r\n }\r\n });\r\n }\r\n if (PaymentSDK.CARDINAL_RESPONSE_CODE.equals(response.getResponseCode())) {\r\n \/\/ Create WebView to process the Authorize purchase request\r\n webView = new AuthorizeWebView(context, response) {\r\n @Override\r\n public void onPageDone() { \r\n AuthorizeCardRequest request = new AuthorizeCardRequest();\r\n request.setAuthData(request.getAuthData()); \/\/ Set the request Auth Data.\r\n request.setPaymentId(response.getPaymentId()); \/\/ Set the payment identifier for the request.\r\n request.setTransactionId(response.getTransactionId()); \/\/ Set payment identifier for the request.\r\n request.setEciFlag(response.getEciFlag()); \/\/ Set the Electronic Commerce Indicator (ECI).\r\n new PaymentSDK(context, options)\r\n .authorizeCard(request, new IswCallback<AuthorizeCardResponse>() {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n @Override\r\n public void onSuccess(AuthorizeCardResponse response) {\r\n \/\/Handle and notify user of successful transaction\r\n }\r\n });\r\n }\r\n @Override\r\n public void onPageError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n };\r\n \/\/ Other webview customizations goes here e.g.\r\n webView.requestFocus(View.FOCUS_DOWN);\r\n webView.getSettings().setJavaScriptEnabled(true);\r\n webView.setVerticalScrollBarEnabled(true);\r\n }\r\n}<\/pre>\n<\/div>\n
<\/a><\/a>Authorize PayWithWallet using OTP<\/h2>\n
if (StringUtils.hasText(response.getOtpTransactionIdentifier())) { \/\/ \r\n AuthorizeOtpRequest otpRequest = new AuthorizeOtpRequest(); \r\n \/\/ Setup request parameters using the selected Payment Method\r\n otpRequest.setOtp(\"123456\"); \/\/ Accept OTP from user\r\n \/\/ Set the OTP identifier for the request\r\n otpRequest.setOtpTransactionIdentifier(response.getOtpTransactionIdentifier()); \r\n \/\/ Set the unique transaction reference.\r\n otpRequest.setTransactionRef(response.getTransactionRef());\r\n \/\/Authorize OTP Request\r\n AuthorizeOtpResponse otpResponse = new PurchaseClient(options).authorizeOtp(otpRequest); \r\n \/\/Handle and notify user of successful transaction \r\n }<\/pre>\n<\/div>\n
<\/a><\/a>Checking Payment Status<\/h3>\n
\/\/Pass the transactionRef and the amount as the parameters to getPaymentStatus()\r\n\tPaymentStatusRequest request = new PaymentStatusRequest();\t \r\n\trequest.setTransactionRef(\"117499114589\");\r\n\trequest.setAmount(\"100\");\r\n\tnew PaymentSDK(context, options).getPaymentStatus(request, new IswCallback<PaymentStatusResponse>() {\r\n @Override\r\n public void onError(Exception error) {\r\n \/\/ Handle and notify user of error\r\n }\r\n\r\n @Override\r\n public void onSuccess(PaymentStatusResponse response) {\r\n \/\/ Update Payment Status\r\n }\r\n });<\/pre>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":2412,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"spay_email":""},"doc_tag":[],"_links":{"self":[{"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2417"}],"collection":[{"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/comments?post=2417"}],"version-history":[{"count":3,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2417\/revisions"}],"predecessor-version":[{"id":3278,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2417\/revisions\/3278"}],"up":[{"embeddable":true,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2412"}],"next":[{"title":"Cordova","link":"https:\/\/sandbox.interswitchng.com\/docbase\/docs\/interswitch-payment-gateway-mobile-inappsdk-implementation\/cordova\/","href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2419"}],"prev":[{"title":"Do I need to be PCI-DSS Certified?","link":"https:\/\/sandbox.interswitchng.com\/docbase\/docs\/interswitch-payment-gateway-mobile-inappsdk-implementation\/do-i-need-to-be-pci-dss-certified\/","href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2416"}],"wp:attachment":[{"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/media?parent=2417"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/doc_tag?post=2417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}