{"action":"created","comment":{"url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/comments/225855646","pull_request_review_id":165543419,"id":225855646,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTg1NTY0Ng==","diff_hunk":"@@ -135,30 +147,71 @@ def get_payment_url(self, **kwargs):\n \t\t\t\"token\": response.get(\"TOKEN\")[0],\n \t\t\t\"correlation_id\": response.get(\"CORRELATIONID\")[0]\n \t\t})\n-\n \t\tself.integration_request = create_request_log(kwargs, \"Remote\", \"PayPal\", response.get(\"TOKEN\")[0])\n \n \t\treturn return_url.format(kwargs[\"token\"])\n \n-\tdef execute_set_express_checkout(self, amount, currency):\n+\tdef execute_set_express_checkout(self, **kwargs):\n \t\tparams, url = self.get_paypal_params_and_url()\n+\n \t\tparams.update({\n \t\t\t\"METHOD\": \"SetExpressCheckout\",\n+\t\t\t\"returnUrl\": get_url(\"{0}.get_express_checkout_details\".format(api_path)),\n+\t\t\t\"cancelUrl\": get_url(\"/payment-cancel\"),\n \t\t\t\"PAYMENTREQUEST_0_PAYMENTACTION\": \"SALE\",\n-\t\t\t\"PAYMENTREQUEST_0_AMT\": amount,\n-\t\t\t\"PAYMENTREQUEST_0_CURRENCYCODE\": currency.upper(),\n-\t\t\t\"returnUrl\": get_url(\"/api/method/frappe.integrations.doctype.paypal_settings.paypal_settings.get_express_checkout_details\"),\n-\t\t\t\"cancelUrl\": get_url(\"/payment-cancel\")\n+\t\t\t\"PAYMENTREQUEST_0_AMT\": kwargs['amount'],\n+\t\t\t\"PAYMENTREQUEST_0_CURRENCYCODE\": kwargs['currency'].upper()\n \t\t})\n \n-\t\tparams = urlencode(params)\n+\t\tif kwargs.get('subscription_details'):\n+\t\t\tself.configure_recurring_payments(params, kwargs)\n \n+\t\tparams = urlencode(params)\n \t\tresponse = make_post_request(url, data=params.encode(\"utf-8\"))\n+\n \t\tif response.get(\"ACK\")[0] != \"Success\":\n \t\t\tfrappe.throw(_(\"Looks like something is wrong with this site's Paypal configuration.\"))\n \n \t\treturn response\n \n+\tdef configure_recurring_payments(self, params, kwargs):","path":"frappe/integrations/doctype/paypal_settings/paypal_settings.py","position":81,"original_position":81,"commit_id":"e692b593309c9f5959697fd82f2adff4f025ad9b","original_commit_id":"e692b593309c9f5959697fd82f2adff4f025ad9b","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Method could be a function](https://app.codacy.com/app/vjfalk/frappe/pullRequest?prid=2283774)","created_at":"2018-10-17T09:49:27Z","updated_at":"2018-10-17T09:49:28Z","html_url":"https://github.com/DigiThinkIT/frappe/pull/27#discussion_r225855646","pull_request_url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/comments/225855646"},"html":{"href":"https://github.com/DigiThinkIT/frappe/pull/27#discussion_r225855646"},"pull_request":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27","id":219584090,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NTg0MDkw","html_url":"https://github.com/DigiThinkIT/frappe/pull/27","diff_url":"https://github.com/DigiThinkIT/frappe/pull/27.diff","patch_url":"https://github.com/DigiThinkIT/frappe/pull/27.patch","issue_url":"https://api.github.com/repos/DigiThinkIT/frappe/issues/27","number":27,"state":"open","locked":false,"title":"Update from upstream repo frappe/frappe@develop","user":{"login":"backstroke-bot","id":20205210,"node_id":"MDQ6VXNlcjIwMjA1MjEw","avatar_url":"https://avatars2.githubusercontent.com/u/20205210?v=4","gravatar_id":"","url":"https://api.github.com/users/backstroke-bot","html_url":"https://github.com/backstroke-bot","followers_url":"https://api.github.com/users/backstroke-bot/followers","following_url":"https://api.github.com/users/backstroke-bot/following{/other_user}","gists_url":"https://api.github.com/users/backstroke-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/backstroke-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/backstroke-bot/subscriptions","organizations_url":"https://api.github.com/users/backstroke-bot/orgs","repos_url":"https://api.github.com/users/backstroke-bot/repos","events_url":"https://api.github.com/users/backstroke-bot/events{/privacy}","received_events_url":"https://api.github.com/users/backstroke-bot/received_events","type":"User","site_admin":false},"body":"Hello!\n\nThe upstream repository `frappe/frappe@develop` has some new changes that aren't in this fork. So, here they are, ready to be merged! :tada:\n\nIf this pull request can be merged without conflict, you can publish your software with these new changes. Otherwise, fix any merge conflicts by clicking the `Resolve Conflicts` button.\n\n--------\n<img\n  src=\"https://backstroke.co/assets/img/donate.png\"\n  height=\"92\"\n  align=\"left\"\n/>\n\nIf you like Backstroke, consider donating to help us pay for infrastructure <a href=\"https://liberapay.com/Backstroke/\">here</a>. Backstroke is a completely open source project that's free to use, but we survive on sponsorships and donations. Thanks for your support! <a href=\"https://liberapay.com/Backstroke/\">Help out Backstroke</a>.\n\n--------\nCreated by [Backstroke](https://backstroke.co) (I'm a bot!)\n","created_at":"2018-10-02T04:41:56Z","updated_at":"2018-10-17T09:49:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df12fac38983d67197dce45171bea62df74c60f7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27/commits","review_comments_url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27/comments","review_comment_url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DigiThinkIT/frappe/issues/27/comments","statuses_url":"https://api.github.com/repos/DigiThinkIT/frappe/statuses/e692b593309c9f5959697fd82f2adff4f025ad9b","head":{"label":"frappe:develop","ref":"develop","sha":"e692b593309c9f5959697fd82f2adff4f025ad9b","user":{"login":"frappe","id":836974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgzNjk3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/836974?v=4","gravatar_id":"","url":"https://api.github.com/users/frappe","html_url":"https://github.com/frappe","followers_url":"https://api.github.com/users/frappe/followers","following_url":"https://api.github.com/users/frappe/following{/other_user}","gists_url":"https://api.github.com/users/frappe/gists{/gist_id}","starred_url":"https://api.github.com/users/frappe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frappe/subscriptions","organizations_url":"https://api.github.com/users/frappe/orgs","repos_url":"https://api.github.com/users/frappe/repos","events_url":"https://api.github.com/users/frappe/events{/privacy}","received_events_url":"https://api.github.com/users/frappe/received_events","type":"Organization","site_admin":false},"repo":{"id":1864194,"node_id":"MDEwOlJlcG9zaXRvcnkxODY0MTk0","name":"frappe","full_name":"frappe/frappe","private":false,"owner":{"login":"frappe","id":836974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgzNjk3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/836974?v=4","gravatar_id":"","url":"https://api.github.com/users/frappe","html_url":"https://github.com/frappe","followers_url":"https://api.github.com/users/frappe/followers","following_url":"https://api.github.com/users/frappe/following{/other_user}","gists_url":"https://api.github.com/users/frappe/gists{/gist_id}","starred_url":"https://api.github.com/users/frappe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frappe/subscriptions","organizations_url":"https://api.github.com/users/frappe/orgs","repos_url":"https://api.github.com/users/frappe/repos","events_url":"https://api.github.com/users/frappe/events{/privacy}","received_events_url":"https://api.github.com/users/frappe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/frappe/frappe","description":"Full Stack Web Framework in Python & JS. Used to build ERPNext","fork":false,"url":"https://api.github.com/repos/frappe/frappe","forks_url":"https://api.github.com/repos/frappe/frappe/forks","keys_url":"https://api.github.com/repos/frappe/frappe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frappe/frappe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frappe/frappe/teams","hooks_url":"https://api.github.com/repos/frappe/frappe/hooks","issue_events_url":"https://api.github.com/repos/frappe/frappe/issues/events{/number}","events_url":"https://api.github.com/repos/frappe/frappe/events","assignees_url":"https://api.github.com/repos/frappe/frappe/assignees{/user}","branches_url":"https://api.github.com/repos/frappe/frappe/branches{/branch}","tags_url":"https://api.github.com/repos/frappe/frappe/tags","blobs_url":"https://api.github.com/repos/frappe/frappe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frappe/frappe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frappe/frappe/git/refs{/sha}","trees_url":"https://api.github.com/repos/frappe/frappe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frappe/frappe/statuses/{sha}","languages_url":"https://api.github.com/repos/frappe/frappe/languages","stargazers_url":"https://api.github.com/repos/frappe/frappe/stargazers","contributors_url":"https://api.github.com/repos/frappe/frappe/contributors","subscribers_url":"https://api.github.com/repos/frappe/frappe/subscribers","subscription_url":"https://api.github.com/repos/frappe/frappe/subscription","commits_url":"https://api.github.com/repos/frappe/frappe/commits{/sha}","git_commits_url":"https://api.github.com/repos/frappe/frappe/git/commits{/sha}","comments_url":"https://api.github.com/repos/frappe/frappe/comments{/number}","issue_comment_url":"https://api.github.com/repos/frappe/frappe/issues/comments{/number}","contents_url":"https://api.github.com/repos/frappe/frappe/contents/{+path}","compare_url":"https://api.github.com/repos/frappe/frappe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frappe/frappe/merges","archive_url":"https://api.github.com/repos/frappe/frappe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frappe/frappe/downloads","issues_url":"https://api.github.com/repos/frappe/frappe/issues{/number}","pulls_url":"https://api.github.com/repos/frappe/frappe/pulls{/number}","milestones_url":"https://api.github.com/repos/frappe/frappe/milestones{/number}","notifications_url":"https://api.github.com/repos/frappe/frappe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frappe/frappe/labels{/name}","releases_url":"https://api.github.com/repos/frappe/frappe/releases{/id}","deployments_url":"https://api.github.com/repos/frappe/frappe/deployments","created_at":"2011-06-08T08:14:16Z","updated_at":"2018-10-17T09:43:34Z","pushed_at":"2018-10-17T09:43:27Z","git_url":"git://github.com/frappe/frappe.git","ssh_url":"git@github.com:frappe/frappe.git","clone_url":"https://github.com/frappe/frappe.git","svn_url":"https://github.com/frappe/frappe","homepage":"http://frappe.io","size":174730,"stargazers_count":989,"watchers_count":989,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":790,"mirror_url":null,"archived":false,"open_issues_count":327,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":790,"open_issues":327,"watchers":989,"default_branch":"develop"}},"base":{"label":"DigiThinkIT:bloomstack-develop","ref":"bloomstack-develop","sha":"ebb5776bddd6bb71032bc4fcb5f50c662230cf93","user":{"login":"DigiThinkIT","id":1655928,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTU5Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/1655928?v=4","gravatar_id":"","url":"https://api.github.com/users/DigiThinkIT","html_url":"https://github.com/DigiThinkIT","followers_url":"https://api.github.com/users/DigiThinkIT/followers","following_url":"https://api.github.com/users/DigiThinkIT/following{/other_user}","gists_url":"https://api.github.com/users/DigiThinkIT/gists{/gist_id}","starred_url":"https://api.github.com/users/DigiThinkIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DigiThinkIT/subscriptions","organizations_url":"https://api.github.com/users/DigiThinkIT/orgs","repos_url":"https://api.github.com/users/DigiThinkIT/repos","events_url":"https://api.github.com/users/DigiThinkIT/events{/privacy}","received_events_url":"https://api.github.com/users/DigiThinkIT/received_events","type":"Organization","site_admin":false},"repo":{"id":66088811,"node_id":"MDEwOlJlcG9zaXRvcnk2NjA4ODgxMQ==","name":"frappe","full_name":"DigiThinkIT/frappe","private":false,"owner":{"login":"DigiThinkIT","id":1655928,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTU5Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/1655928?v=4","gravatar_id":"","url":"https://api.github.com/users/DigiThinkIT","html_url":"https://github.com/DigiThinkIT","followers_url":"https://api.github.com/users/DigiThinkIT/followers","following_url":"https://api.github.com/users/DigiThinkIT/following{/other_user}","gists_url":"https://api.github.com/users/DigiThinkIT/gists{/gist_id}","starred_url":"https://api.github.com/users/DigiThinkIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DigiThinkIT/subscriptions","organizations_url":"https://api.github.com/users/DigiThinkIT/orgs","repos_url":"https://api.github.com/users/DigiThinkIT/repos","events_url":"https://api.github.com/users/DigiThinkIT/events{/privacy}","received_events_url":"https://api.github.com/users/DigiThinkIT/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DigiThinkIT/frappe","description":"Rapid Application Development Framework in Python & JS. Used to build ERPNext","fork":true,"url":"https://api.github.com/repos/DigiThinkIT/frappe","forks_url":"https://api.github.com/repos/DigiThinkIT/frappe/forks","keys_url":"https://api.github.com/repos/DigiThinkIT/frappe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DigiThinkIT/frappe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DigiThinkIT/frappe/teams","hooks_url":"https://api.github.com/repos/DigiThinkIT/frappe/hooks","issue_events_url":"https://api.github.com/repos/DigiThinkIT/frappe/issues/events{/number}","events_url":"https://api.github.com/repos/DigiThinkIT/frappe/events","assignees_url":"https://api.github.com/repos/DigiThinkIT/frappe/assignees{/user}","branches_url":"https://api.github.com/repos/DigiThinkIT/frappe/branches{/branch}","tags_url":"https://api.github.com/repos/DigiThinkIT/frappe/tags","blobs_url":"https://api.github.com/repos/DigiThinkIT/frappe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DigiThinkIT/frappe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DigiThinkIT/frappe/git/refs{/sha}","trees_url":"https://api.github.com/repos/DigiThinkIT/frappe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DigiThinkIT/frappe/statuses/{sha}","languages_url":"https://api.github.com/repos/DigiThinkIT/frappe/languages","stargazers_url":"https://api.github.com/repos/DigiThinkIT/frappe/stargazers","contributors_url":"https://api.github.com/repos/DigiThinkIT/frappe/contributors","subscribers_url":"https://api.github.com/repos/DigiThinkIT/frappe/subscribers","subscription_url":"https://api.github.com/repos/DigiThinkIT/frappe/subscription","commits_url":"https://api.github.com/repos/DigiThinkIT/frappe/commits{/sha}","git_commits_url":"https://api.github.com/repos/DigiThinkIT/frappe/git/commits{/sha}","comments_url":"https://api.github.com/repos/DigiThinkIT/frappe/comments{/number}","issue_comment_url":"https://api.github.com/repos/DigiThinkIT/frappe/issues/comments{/number}","contents_url":"https://api.github.com/repos/DigiThinkIT/frappe/contents/{+path}","compare_url":"https://api.github.com/repos/DigiThinkIT/frappe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DigiThinkIT/frappe/merges","archive_url":"https://api.github.com/repos/DigiThinkIT/frappe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DigiThinkIT/frappe/downloads","issues_url":"https://api.github.com/repos/DigiThinkIT/frappe/issues{/number}","pulls_url":"https://api.github.com/repos/DigiThinkIT/frappe/pulls{/number}","milestones_url":"https://api.github.com/repos/DigiThinkIT/frappe/milestones{/number}","notifications_url":"https://api.github.com/repos/DigiThinkIT/frappe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DigiThinkIT/frappe/labels{/name}","releases_url":"https://api.github.com/repos/DigiThinkIT/frappe/releases{/id}","deployments_url":"https://api.github.com/repos/DigiThinkIT/frappe/deployments","created_at":"2016-08-19T14:36:53Z","updated_at":"2016-08-19T14:36:59Z","pushed_at":"2018-10-17T09:43:31Z","git_url":"git://github.com/DigiThinkIT/frappe.git","ssh_url":"git@github.com:DigiThinkIT/frappe.git","clone_url":"https://github.com/DigiThinkIT/frappe.git","svn_url":"https://github.com/DigiThinkIT/frappe","homepage":"http://frappe.io","size":175704,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27"},"html":{"href":"https://github.com/DigiThinkIT/frappe/pull/27"},"issue":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/issues/27"},"comments":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/DigiThinkIT/frappe/statuses/e692b593309c9f5959697fd82f2adff4f025ad9b"}},"author_association":"NONE"}}
{"actor":{"display_login":"codacy-bot"}}