( ! ) 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.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2267 | 9258472 | rest_get_server( ) | ...\rest-api.php:403 |
11 | 0.2267 | 9261408 | do_action( ) | ...\rest-api.php:577 |
12 | 0.2268 | 9261784 | WP_Hook->do_action( ) | ...\plugin.php:517 |
13 | 0.2268 | 9261784 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
14 | 0.2276 | 9300984 | Jetpack_Core_Json_Api_Endpoints::register_endpoints( ) | ...\class-wp-hook.php:308 |
15 | 0.2278 | 9308976 | 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.2856 | 11048968 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:310 |
12 | 0.2856 | 11049296 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.2866 | 11048912 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:311 |
12 | 0.2866 | 11049232 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.2878 | 11049104 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:315 |
12 | 0.2878 | 11049472 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.2887 | 11048992 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:323 |
12 | 0.2887 | 11049312 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.2895 | 11049056 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:335 |
12 | 0.2895 | 11049424 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.2902 | 11049104 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:359 |
12 | 0.2902 | 11049472 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3799 | 11347040 | WP_REST_Server->send_headers( ) | ...\class-wp-rest-server.php:475 |
12 | 0.3799 | 11347040 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:1774 |
13 | 0.3799 | 11347680 | header ( ) | ...\class-wp-rest-server.php:1762 |
( ! ) 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 1762 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0001 | 401504 | {main}( ) | ...\index.php:0 |
2 | 0.0002 | 401784 | require( 'C:\wamp64_2\www\docbase\wp-blog-header.php' ) | ...\index.php:17 |
3 | 0.2262 | 9230712 | wp( ) | ...\wp-blog-header.php:16 |
4 | 0.2262 | 9230736 | WP->main( ) | ...\functions.php:1334 |
5 | 0.2262 | 9230736 | WP->parse_request( ) | ...\class-wp.php:780 |
6 | 0.2267 | 9257424 | do_action_ref_array( ) | ...\class-wp.php:399 |
7 | 0.2267 | 9257424 | WP_Hook->do_action( ) | ...\plugin.php:565 |
8 | 0.2267 | 9257424 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:332 |
9 | 0.2267 | 9258440 | rest_api_loaded( ) | ...\class-wp-hook.php:308 |
10 | 0.2855 | 11049312 | WP_REST_Server->serve_request( ) | ...\rest-api.php:410 |
11 | 0.3799 | 11347040 | WP_REST_Server->send_headers( ) | ...\class-wp-rest-server.php:475 |
12 | 0.3810 | 11347040 | WP_REST_Server->send_header( ) | ...\class-wp-rest-server.php:1774 |
13 | 0.3811 | 11347360 | header ( ) | ...\class-wp-rest-server.php:1762 |
Interswitch cordova payment plugin allows you to accept payments from customers within your cordova mobile application.<\/p>\n
Please Note:\u00a0The current supported currency is naira (NGN), support for other currencies would be added later<\/em><\/strong><\/p>\n The first step to \u200busing the plugin is to register as a merchant. This is described [here] (merchantxuat.interswitchng.com)<\/p>\n Replace clientId and clientSecret in the command below with your clientId and clientSecret<\/p>\n Please Note:<\/strong>\u00a0Ensure your cordova.js file is the first Javascript file to be included in your index.html<\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n<\/div>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2412,"menu_order":4,"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\/2419"}],"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=2419"}],"version-history":[{"count":4,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2419\/revisions"}],"predecessor-version":[{"id":3281,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2419\/revisions\/3281"}],"up":[{"embeddable":true,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2412"}],"next":[{"title":"Querying a Transaction","link":"https:\/\/sandbox.interswitchng.com\/docbase\/docs\/interswitch-payment-gateway-mobile-inappsdk-implementation\/querying-a-transaction\/","href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2969"}],"prev":[{"title":"Android","link":"https:\/\/sandbox.interswitchng.com\/docbase\/docs\/interswitch-payment-gateway-mobile-inappsdk-implementation\/android\/","href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/docs\/2417"}],"wp:attachment":[{"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/media?parent=2419"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sandbox.interswitchng.com\/docbase\/wp-json\/wp\/v2\/doc_tag?post=2419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<\/a><\/a>First steps<\/h2>\n
\n
<\/a><\/a>Plugin installation instructions for Android<\/h2>\n
\n
cordova plugin add https:\/\/github.com\/techquest\/cordova-payment-plugin-2.git\r\n\r\n* Add ```android``` platform. Make sure to add the platform **after** adding the plugin.\r\n\r\n```terminal\r\ncordova platform add android\r\n<\/code><\/pre>\n
\n
<\/a><\/a>Plugin installation instructions for iOS<\/h2>\n
\n
cordova plugin add https:\/\/github.com\/techquest\/cordova-payment-plugin-2.git\r\n<\/code><\/pre>\n
\n
ios<\/code>\u00a0platform. Make sure to add the platform\u00a0after<\/strong>\u00a0adding the plugin.<\/li>\n<\/ul>\n
cordova platform add ios\r\n<\/code><\/pre>\n
\n
Finder<\/code>, go to the\u00a0YourCordovaApp\/platforms\/ios<\/strong>\u00a0directory. Open the .xcodeproj file in XCode. A dialog may appear asking: Convert to latest Swift Syntax? Click the\u00a0Cancel<\/strong>\u00a0button.<\/li>\n
Finder<\/code>, go to the\u00a0
\/platforms\/ios\/<NameOfApp>\/Plugins\/com.interswitchng.sdk.payment<\/code>\u00a0directory. You should see a number of files like\u00a0.framework<\/strong>\u00a0file.<\/li>\n
Finder<\/code>\u00a0to XCode’s\u00a0Embedded Binaries<\/strong>\u00a0section for your app’s\u00a0TARGETS<\/strong>\u00a0settings. This will be found under the\u00a0
General<\/code>\u00a0tab.<\/li>\n
Copy items if needed<\/code>\u00a0is unchecked.<\/li>\n
### <a name='SandBoxMode'><\/a> Using The Plugin in Sandbox Mode\r\n\r\nDuring development of your app, you should use the Plugin in sandbox mode to enable testing. Different Client Id and Client Secret are provided for Production and Sandbox mode. The procedure to use the Plugin on sandbox mode is just as easy:\r\n\r\n* Use Sandbox Client Id and Client Secret got from the Sandbox Tab of the Developer Console after signup (usually you have to wait for 5 minutes after signup for you to see the Sandbox details) everywhere you are required to supply Client Id and Client Secret in the remainder of this documentation \r\n* In your code, override the api base as follows\r\n\r\n```javascript\r\n function init(){\r\n var userDetails = {\r\n clientId: \"IKIAF8F70479A6902D4BFF4E443EBF15D1D6CB19E232\",\r\n clientSecret: \"ugsmiXPXOOvks9MR7+IFHSQSdk8ZzvwQMGvd0GJva30=\",\r\n paymentApi : \"https:\/\/sandbox.interswitchng.com\",\r\n passportApi : \"https:\/\/sandbox.interswitchng.com\/passport\"\r\n };\r\n var initial = PaymentPlugin.init(userDetails);\r\n }<\/pre>\n
\n
Using the Plugin with UI (In PCI-DSS Scope: No )<\/h2>\n
<\/a><\/a>Pay with Card<\/h3>\n
\n
\n
var payRequest = {\t\t\t\r\n amount : 100, \/\/ Amount in Naira\r\n customerId : 1234567890, \/\/ Optional email, mobile no, BVN etc to uniquely identify the customer.\r\n currency : \"NGN\", \/\/ ISO Currency code\r\n description : \"Purchase Phone\" \/\/ Description of product to purchase\r\n }<\/pre>\n
\n
var paySuccess = function(response) {\r\n var purchaseResponse = JSON.parse(response); \/\/ transaction success reponse\r\n alert(purchaseResponse.message); \r\n }\r\n var payFail = function(response) {\r\n alert(response); \/\/ transaction failure reponse\r\n }\r\n PaymentPlugin.pay(payRequest, paySuccess, payFail);<\/pre>\n
<\/h3>\n
Pay with Card<\/h3>\n
\n
var payWithCardRequest = {\t\t\t\r\n amount : 100, \/\/ Amount in Naira\r\n customerId : 1234567890, \/\/ Optional email, mobile no, BVN etc to uniquely identify the customer.\r\n currency : \"NGN\", \/\/ ISO Currency code\r\n description : \"Purchase Phone\" \/\/ Description of product to purchase\r\n }<\/pre>\n
\n
var payWithCardSuccess = function(response) {\r\n var purchaseResponse = JSON.parse(response); \/\/ transaction success reponse\r\n alert(purchaseResponse.message);\r\n }\r\n var payWithCardFail = function(response) {\r\n alert(response); \/\/ transaction failure reponse\r\n }\r\n PaymentPlugin.payWithCard(payWithCardRequest, payWithCardSuccess, payWithCardFail);<\/pre>\n
Using the Plugin without UI (In PCI-DSS Scope: Yes)<\/h2>\n
<\/a><\/a>Pay with Card<\/h3>\n
\n
var purchaseRequest = {\r\n pan:5060990580000217499, \/\/Card No or Token\r\n amount : 100, \/\/ Amount in Naira\r\n cvv : 111, \/\/ Card CVV\r\n pin : 1111, \/\/ Optional Card PIN for card payment\r\n currency : \"NGN\", \/\/ ISO Currency code\r\n expiryDate : 2004, \/\/ Card or Token expiry date in YYMM format\r\n customerId : 1234567890 \/\/ Optional email, mobile no, BVN etc to uniquely identify the customer.\r\n }<\/pre>\n
var makePaymentSuccess = function(response) {\r\n var responseObject ={};\r\n if(response.responseCode !== undefined){\r\n responseObject = response;\r\n }else if (response.responseCode === undefined){\r\n responseObject = JSON.parse(response);\r\n }\r\n if(responseObject.responseCode) {\r\n if (responseObject.responseCode === \"T0\") {\r\n ons.notification.prompt(responseObject.message).then(\r\n function(otp) {\r\n responseObject.method = \"makePayment\";\r\n responseObject.otpValue = otp;\r\n authorizePurchase(responseObject);\r\n }\r\n );\r\n } \r\n }\r\n else { \r\n if(responseObject.detailMessage !== undefined && responseObject.detailMessage !== null ){\r\n alert(responseObject.detailMessage); \r\n }else{\r\n alert(responseObject);\r\n }\r\n } \r\n \/\/var responseObject = JSON.parse(response);\r\n \/\/the response object here contains amount, message, transactionIdentifier and transactionRef \r\n alert(responseObject.message);\r\n }\r\n var makePaymentFail = function(response) {\r\n alert(response);\r\n } \r\n PaymentPlugin.makePayment(purchaseRequest, makePaymentSuccess, makePaymentFail);<\/pre>\n
Authorize Transaction With OTP<\/h2>\n
\n
var authorizeRequest = {\r\n otp : results.otpValue, \/\/ Accept OTP from user\r\n paymentId: results.paymentId, \/\/ Set the OTP identifier for the request\r\n transactionRef: results.transactionRef, \/\/ Set the unique transaction reference.\r\n authData: results.authData \/\/ Set request authData.\r\n }<\/pre>\n
\n
var authorizeSuccess = function(response) { \r\n var responseObject = JSON.parse(response);\r\n var theTransactionRef = responseObject.transactionRef; \r\n alert(theTransactionRef); \/\/ transaction success response\r\n }\r\n var authorizeFail = function(response) { \r\n alert(response); \/\/ transaction failure response\r\n } \r\n if(results.method ===\"makePayment\"){\r\n PaymentPlugin.authorizePurchase(authorizeRequest, authorizeSuccess, authorizeFail); \r\n }\r\n else if (results.method ===\"validateCard\"){\r\n PaymentPlugin.authorizeCard(authorizeRequest, authorizeSuccess, authorizeFail); \r\n }<\/pre>\n
Checking Payment Status<\/h3>\n
\n
var paymentStatusRequest = {\r\n transactionRef : 117499114589, \/\/ The transaction unique reference.\r\n amount : 100 \/\/ The transaction amount\r\n }<\/pre>\n
\n
var paymentStatusSuccess = function(response) {\r\n var responseObject = JSON.parse(response);\r\n alert(responseObject.message);\r\n }\r\n var paymentStatusFail = function(response) {\r\n alert(response);\r\n }\r\n PaymentPlugin.paymentStatus(paymentStatusRequest, paymentStatusSuccess, paymentStatusFail);<\/pre>\n