{"action":"created","comment":{"url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/comments/35102408","id":35102408,"diff_hunk":"@@ -249,21 +279,33 @@ public void onClick(DialogInterface dialogInterface, int i) {\n     }\n \n     private void startPaymentActivity() {\n+\n         // Check we have valid templates for every printjob\n-        for (PrintJob job : printOrder.getJobs()) {\n-            try {\n-                Template.getTemplate(job.getTemplateId());\n-            } catch (Exception ex) {\n-                showRetryTemplateSyncDialog(ex);\n-                return;\n-            }\n-        }\n \n-        Intent i = new Intent(this, PaymentActivity.class);\n-        i.putExtra(PaymentActivity.EXTRA_PRINT_ORDER, (Parcelable) printOrder);\n-        i.putExtra(PaymentActivity.EXTRA_PRINT_API_KEY, apiKey);\n-        i.putExtra(PaymentActivity.EXTRA_PRINT_ENVIRONMENT, getPaymentActivityEnvironment());\n-        startActivityForResult(i, REQUEST_CODE_PAYMENT);\n+        try\n+          {\n+          // This will return null if there are no products, or they are out of date, but that's\n+          // OK because we catch any exceptions.\n+          Pair<ArrayList<ProductGroup>,HashMap<String,Product>> productPair = ProductLoader.getInstance( this ).getCachedProducts( MAXIMUM_PRODUCT_AGE_MILLIS );\n+\n+          // Go through every print job and check that we can get a product from the product id\n+          for ( PrintJob job : mPrintOrder.getJobs() )\n+            {\n+            String productId = productPair.second.get( job.getProduct().getId() ).getId();\n+            }\n+          }\n+        catch ( Exception exception )\n+          {\n+          showRetryTemplateSyncDialog( exception );\n+          return;\n+          }\n+\n+        PaymentActivity.start( this, mPrintOrder, apiKey, getPaymentActivityEnvironment(),  REQUEST_CODE_PAYMENT );\n+//        Intent i = new Intent(this, PaymentActivity.class);","path":"KitePrintSDK/src/main/java/ly/kite/checkout/CheckoutActivity.java","position":285,"original_position":285,"commit_id":"cc2823f5ad11ecd6aa3881da5b81db50f061443b","original_commit_id":"cc2823f5ad11ecd6aa3881da5b81db50f061443b","user":{"login":"dbotha","id":760653,"avatar_url":"https://avatars.githubusercontent.com/u/760653?v=3","gravatar_id":"","url":"https://api.github.com/users/dbotha","html_url":"https://github.com/dbotha","followers_url":"https://api.github.com/users/dbotha/followers","following_url":"https://api.github.com/users/dbotha/following{/other_user}","gists_url":"https://api.github.com/users/dbotha/gists{/gist_id}","starred_url":"https://api.github.com/users/dbotha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbotha/subscriptions","organizations_url":"https://api.github.com/users/dbotha/orgs","repos_url":"https://api.github.com/users/dbotha/repos","events_url":"https://api.github.com/users/dbotha/events{/privacy}","received_events_url":"https://api.github.com/users/dbotha/received_events","type":"User","site_admin":false},"body":"Probably worth making this code comment go away if you don't want it anymore","created_at":"2015-07-21T13:42:36Z","updated_at":"2015-07-21T13:42:36Z","html_url":"https://github.com/OceanLabs/Android-Print-SDK/pull/9#discussion_r35102408","pull_request_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/comments/35102408"},"html":{"href":"https://github.com/OceanLabs/Android-Print-SDK/pull/9#discussion_r35102408"},"pull_request":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9","id":40251140,"html_url":"https://github.com/OceanLabs/Android-Print-SDK/pull/9","diff_url":"https://github.com/OceanLabs/Android-Print-SDK/pull/9.diff","patch_url":"https://github.com/OceanLabs/Android-Print-SDK/pull/9.patch","issue_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/9","number":9,"state":"open","locked":false,"title":"Cases1.12","user":{"login":"JLKite","id":12950522,"avatar_url":"https://avatars.githubusercontent.com/u/12950522?v=3","gravatar_id":"","url":"https://api.github.com/users/JLKite","html_url":"https://github.com/JLKite","followers_url":"https://api.github.com/users/JLKite/followers","following_url":"https://api.github.com/users/JLKite/following{/other_user}","gists_url":"https://api.github.com/users/JLKite/gists{/gist_id}","starred_url":"https://api.github.com/users/JLKite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLKite/subscriptions","organizations_url":"https://api.github.com/users/JLKite/orgs","repos_url":"https://api.github.com/users/JLKite/repos","events_url":"https://api.github.com/users/JLKite/events{/privacy}","received_events_url":"https://api.github.com/users/JLKite/received_events","type":"User","site_admin":false},"body":"All changes up to version 1.12","created_at":"2015-07-17T17:03:03Z","updated_at":"2015-07-21T13:42:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba51ff79140be18a83c3bd4148fd60edd3536c6a","assignee":{"login":"dbotha","id":760653,"avatar_url":"https://avatars.githubusercontent.com/u/760653?v=3","gravatar_id":"","url":"https://api.github.com/users/dbotha","html_url":"https://github.com/dbotha","followers_url":"https://api.github.com/users/dbotha/followers","following_url":"https://api.github.com/users/dbotha/following{/other_user}","gists_url":"https://api.github.com/users/dbotha/gists{/gist_id}","starred_url":"https://api.github.com/users/dbotha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbotha/subscriptions","organizations_url":"https://api.github.com/users/dbotha/orgs","repos_url":"https://api.github.com/users/dbotha/repos","events_url":"https://api.github.com/users/dbotha/events{/privacy}","received_events_url":"https://api.github.com/users/dbotha/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9/commits","review_comments_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9/comments","review_comment_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/9/comments","statuses_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/statuses/cc2823f5ad11ecd6aa3881da5b81db50f061443b","head":{"label":"OceanLabs:cases1.12","ref":"cases1.12","sha":"cc2823f5ad11ecd6aa3881da5b81db50f061443b","user":{"login":"OceanLabs","id":5639181,"avatar_url":"https://avatars.githubusercontent.com/u/5639181?v=3","gravatar_id":"","url":"https://api.github.com/users/OceanLabs","html_url":"https://github.com/OceanLabs","followers_url":"https://api.github.com/users/OceanLabs/followers","following_url":"https://api.github.com/users/OceanLabs/following{/other_user}","gists_url":"https://api.github.com/users/OceanLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/OceanLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceanLabs/subscriptions","organizations_url":"https://api.github.com/users/OceanLabs/orgs","repos_url":"https://api.github.com/users/OceanLabs/repos","events_url":"https://api.github.com/users/OceanLabs/events{/privacy}","received_events_url":"https://api.github.com/users/OceanLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":18213999,"name":"Android-Print-SDK","full_name":"OceanLabs/Android-Print-SDK","owner":{"login":"OceanLabs","id":5639181,"avatar_url":"https://avatars.githubusercontent.com/u/5639181?v=3","gravatar_id":"","url":"https://api.github.com/users/OceanLabs","html_url":"https://github.com/OceanLabs","followers_url":"https://api.github.com/users/OceanLabs/followers","following_url":"https://api.github.com/users/OceanLabs/following{/other_user}","gists_url":"https://api.github.com/users/OceanLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/OceanLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceanLabs/subscriptions","organizations_url":"https://api.github.com/users/OceanLabs/orgs","repos_url":"https://api.github.com/users/OceanLabs/repos","events_url":"https://api.github.com/users/OceanLabs/events{/privacy}","received_events_url":"https://api.github.com/users/OceanLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OceanLabs/Android-Print-SDK","description":"Android Print SDK. Easily to add print on demand functionality to your app within minutes! Print Postcards, Magnets, Photo Prints, Posters, Stickers, T-Shirts, PhotoBooks, etc.","fork":false,"url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK","forks_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/forks","keys_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/teams","hooks_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/hooks","issue_events_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/events","assignees_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/tags","blobs_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/languages","stargazers_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/stargazers","contributors_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/contributors","subscribers_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/subscribers","subscription_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/subscription","commits_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/merges","archive_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/downloads","issues_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/labels{/name}","releases_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/releases{/id}","created_at":"2014-03-28T14:04:28Z","updated_at":"2015-06-10T03:42:07Z","pushed_at":"2015-07-21T09:43:26Z","git_url":"git://github.com/OceanLabs/Android-Print-SDK.git","ssh_url":"git@github.com:OceanLabs/Android-Print-SDK.git","clone_url":"https://github.com/OceanLabs/Android-Print-SDK.git","svn_url":"https://github.com/OceanLabs/Android-Print-SDK","homepage":"https://www.kite.ly","size":15163,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":12,"default_branch":"master"}},"base":{"label":"OceanLabs:master","ref":"master","sha":"bda9f46ea716aa64a057cdda88834e71082ed0a1","user":{"login":"OceanLabs","id":5639181,"avatar_url":"https://avatars.githubusercontent.com/u/5639181?v=3","gravatar_id":"","url":"https://api.github.com/users/OceanLabs","html_url":"https://github.com/OceanLabs","followers_url":"https://api.github.com/users/OceanLabs/followers","following_url":"https://api.github.com/users/OceanLabs/following{/other_user}","gists_url":"https://api.github.com/users/OceanLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/OceanLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceanLabs/subscriptions","organizations_url":"https://api.github.com/users/OceanLabs/orgs","repos_url":"https://api.github.com/users/OceanLabs/repos","events_url":"https://api.github.com/users/OceanLabs/events{/privacy}","received_events_url":"https://api.github.com/users/OceanLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":18213999,"name":"Android-Print-SDK","full_name":"OceanLabs/Android-Print-SDK","owner":{"login":"OceanLabs","id":5639181,"avatar_url":"https://avatars.githubusercontent.com/u/5639181?v=3","gravatar_id":"","url":"https://api.github.com/users/OceanLabs","html_url":"https://github.com/OceanLabs","followers_url":"https://api.github.com/users/OceanLabs/followers","following_url":"https://api.github.com/users/OceanLabs/following{/other_user}","gists_url":"https://api.github.com/users/OceanLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/OceanLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceanLabs/subscriptions","organizations_url":"https://api.github.com/users/OceanLabs/orgs","repos_url":"https://api.github.com/users/OceanLabs/repos","events_url":"https://api.github.com/users/OceanLabs/events{/privacy}","received_events_url":"https://api.github.com/users/OceanLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OceanLabs/Android-Print-SDK","description":"Android Print SDK. Easily to add print on demand functionality to your app within minutes! Print Postcards, Magnets, Photo Prints, Posters, Stickers, T-Shirts, PhotoBooks, etc.","fork":false,"url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK","forks_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/forks","keys_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/teams","hooks_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/hooks","issue_events_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/events","assignees_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/tags","blobs_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/languages","stargazers_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/stargazers","contributors_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/contributors","subscribers_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/subscribers","subscription_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/subscription","commits_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/merges","archive_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/downloads","issues_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/labels{/name}","releases_url":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/releases{/id}","created_at":"2014-03-28T14:04:28Z","updated_at":"2015-06-10T03:42:07Z","pushed_at":"2015-07-21T09:43:26Z","git_url":"git://github.com/OceanLabs/Android-Print-SDK.git","ssh_url":"git@github.com:OceanLabs/Android-Print-SDK.git","clone_url":"https://github.com/OceanLabs/Android-Print-SDK.git","svn_url":"https://github.com/OceanLabs/Android-Print-SDK","homepage":"https://www.kite.ly","size":15163,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9"},"html":{"href":"https://github.com/OceanLabs/Android-Print-SDK/pull/9"},"issue":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/9"},"comments":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/OceanLabs/Android-Print-SDK/statuses/cc2823f5ad11ecd6aa3881da5b81db50f061443b"}}}}