{ "id": "137663", "key": "AC-1435", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-11-05T19:04:49.000+0000", "created": "2014-10-04T14:09:47.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "The Module located here: https://github.com/appcelerator-modules/ti.paypal\r\n\r\n+Solution:+ The TiPaypal Module does Not have a property for *actionType*. I think this will solve the issue if added.\r\n\r\n+Details:+ While trying to Implement a **Delayed Chain Payment**, I've added the following code:\r\n{code:javascript|borderStyle=solid}\r\nbutton = Paypal.createPaypalButton({\r\n width: 194, height: 37,\r\n buttonStyle: Paypal.BUTTON_194x37,\r\n top: 100,\r\n \r\n language: 'en_US',\r\n textStyle: Paypal.PAYPAL_TEXT_PAY,\r\n \r\n appID: payPalAppID,\r\n paypalEnvironment: Paypal.PAYPAL_ENV_SANDBOX, // Sandbox, None or Live\r\n \r\n feePaidByReceiver: true, \r\n enableShipping: false,\r\n\r\n actionType: 'PAY_PRIMARY', // Not Part of the Module\r\n \r\n advancedPayment: { // The payment itself\r\n payments: [\r\n {\r\n isPrimary: true, // Mark this as the primary vendor; this marks this as a chain payment.\r\n merchantName: 'Book App',\r\n paymentType: Paypal.PAYMENT_TYPE_SERVICE,\r\n subtotal: 20,\r\n tax: 0,\r\n shipping: 0,\r\n recipient: 'owner@somedomain.ca', // Sandbox Business Account\r\n customID: 'anythingYouWant',\r\n invoiceItems: [\r\n { name: 'Book Title', totalPrice: 20, itemPrice: 20, itemCount: 1 }\r\n ]\r\n },\r\n {\r\n isPrimary: false, // Delay it?\r\n merchantName: 'Book Seller',\r\n paymentType: Paypal.PAYMENT_TYPE_SERVICE,\r\n subtotal: 10,\r\n tax: 0,\r\n shipping: 0,\r\n recipient: 'tester2@domain.ca', // Sandbox Account\r\n customID: 'anythingYouWant',\r\n invoiceItems: [\r\n { name: 'Book Title', totalPrice: 10, itemPrice: 10, itemCount: 1 }\r\n ]\r\n }\r\n ],\r\n ipnUrl: 'someurl.com',\r\n currency: 'CAD',\r\n memo: 'Book purchase'\r\n }\r\n });\r\n \r\n // Events available\r\n button.addEventListener('paymentCancelled', function (e) {\r\n alert('Payment cancelled. Please try again!');\r\n addButtonToWindow();\r\n });\r\n button.addEventListener('paymentSuccess', function (e) {\r\n alert('Payment successfull. Please get your Policy No.!');\r\n Ti.API.info(JSON.stringify(e));\r\n transID = e.transactionID; // HERE: This should return payKey, but is returning transactionID.\r\n win.remove(button);\r\n });\r\n button.addEventListener('paymentError', function (e) {\r\n alert('Payment Error. Please try again!');\r\n addButtonToWindow();\r\n });\r\n \r\n button.addEventListener('buttonDisplayed', function () {\r\n win.remove(status);\r\n });\r\n \r\n button.addEventListener('buttonError', function () {\r\n alert('Button Error.');\r\n });\r\n \r\nwin.add(button);\r\n{code}\r\n\r\nThe Code above returns in **paymentSuccess** event:\r\n{code:javascript}\r\ntransactionID\t:\tAP-XXXXXXD595635X\t\t\r\nbubbles\t:\ttrue\r\ntype\t:\tpaymentSuccess\r\n\tsource \r\n .... ....\r\n{code}\r\n\r\nThe API Explorer https://devtools-paypal.com/apiexplorer/AdaptivePayments when trying out the same credentials, returns a *''payKey\"* property instead of a \"transactionID\". The PayKey is used later to make the second payment.\r\n\r\nThe code above does the chain payment immediately, however I'd like it to pay the primary receiver only, and then do the second payment at a later date (before 90 days as PayPal suggests).\r\n\r\n+Possible Solution+: The TiPaypal Module does Not have a property for *actionType* . I think this will solve the issue if added, so we can give it a value of: *\"PAY_PRIMARY\"*.\r\n\r\nI've attached a screenshot of the API explorer.", "attachment": [ { "id": "51805", "filename": "Screen Shot 2014-10-04 at 10.11.48 AM.png", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2014-10-04T14:13:29.000+0000", "size": 116965, "mimeType": "image/png" } ], "flagged": false, "summary": "TiPaypal does not make a Delayed Chain Payment", "creator": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "subtasks": [], "reporter": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "environment": "Ti SDK 3.3.0\r\nTiPaypal 1.8.0 (for iOS) & 2.2.3\r\niOS 7+ & Android", "comment": { "comments": [ { "id": "326995", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "Additional Information on Delayed Chain Payments: https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/ht_ap-delayedChainedPayment-curl-etc/\r\n\r\nYou notice this:\r\n{code}\r\nactionType=PAY_PRIMARY\r\n&receiverList.receiver(0).primary=true // Receiver designation (there can be only 1 primary receiver)\r\n&receiverList.receiver(1).primary=false // Delay second receiver\r\n{code}\r\n\r\nThe TiPaypal Module does Not have a property for *actionType*. I think this will solve the issue if added.", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2014-10-04T14:31:22.000+0000", "updated": "2014-10-04T15:44:58.000+0000" }, { "id": "327283", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "Update: It seems that Paypal has no support in the iOS nor Android SDK yet: https://github.com/paypal/PayPal-iOS-SDK/issues/9\r\n\r\nYou can Close this issue.", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2014-10-08T15:21:55.000+0000", "updated": "2014-11-05T18:26:53.000+0000" }, { "id": "330862", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Update: It seems that Paypal has no support in the iOS nor Android SDK yet: https://github.com/paypal/PayPal-iOS-SDK/issues/9\r\n\r\nYou can Close this issue.", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-11-05T19:04:49.000+0000", "updated": "2014-11-05T19:04:49.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }