{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/webpayments/issues/128","repository_url":"https://api.github.com/repos/w3c/webpayments","labels_url":"https://api.github.com/repos/w3c/webpayments/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/w3c/webpayments/issues/128/comments","events_url":"https://api.github.com/repos/w3c/webpayments/issues/128/events","html_url":"https://github.com/w3c/webpayments/issues/128","id":151066322,"number":128,"title":"How can a Web Based Payment App cancel the payment flow?","user":{"login":"tommythorsen","id":12935345,"avatar_url":"https://avatars.githubusercontent.com/u/12935345?v=3","gravatar_id":"","url":"https://api.github.com/users/tommythorsen","html_url":"https://github.com/tommythorsen","followers_url":"https://api.github.com/users/tommythorsen/followers","following_url":"https://api.github.com/users/tommythorsen/following{/other_user}","gists_url":"https://api.github.com/users/tommythorsen/gists{/gist_id}","starred_url":"https://api.github.com/users/tommythorsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tommythorsen/subscriptions","organizations_url":"https://api.github.com/users/tommythorsen/orgs","repos_url":"https://api.github.com/users/tommythorsen/repos","events_url":"https://api.github.com/users/tommythorsen/events{/privacy}","received_events_url":"https://api.github.com/users/tommythorsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T07:46:05Z","updated_at":"2016-04-26T13:59:50Z","closed_at":null,"body":"I've experimented a bit with implementing a web based payment app, by making a simple web app that encapsulates a Visa Checkout flow ([as described here](https://arch.developer.visa.com/vme/merchant/documents/Getting_Started_With_Visa_Checkout/Quick_Start_Tutorial.html)). The Visa Checkout flow consists of a series of pages, which all have an X in the upper right corner for canceling out of the flow. See screenshot:\r\n\r\n![visacheckout](https://cloud.githubusercontent.com/assets/12935345/14810489/8a32f2e2-0b93-11e6-88ae-f4ee85264ec9.png)\r\n\r\nIf the user presses that X, I need to send a \"cancel\" message back to the user agent, so that it can close the browser window and return to a suitable step in the web payments flow.\r\n\r\nWhat would be the best way of doing this? A separate javascript api? Or calling submitPaymentResponse with a response that indicates an error/cancellation? Or Ballista IPC as mentioned in the issue box under payment-apps:6.3.1.1.1?"},"comment":{"url":"https://api.github.com/repos/w3c/webpayments/issues/comments/214754511","html_url":"https://github.com/w3c/webpayments/issues/128#issuecomment-214754511","issue_url":"https://api.github.com/repos/w3c/webpayments/issues/128","id":214754511,"user":{"login":"dlongley","id":168137,"avatar_url":"https://avatars.githubusercontent.com/u/168137?v=3","gravatar_id":"","url":"https://api.github.com/users/dlongley","html_url":"https://github.com/dlongley","followers_url":"https://api.github.com/users/dlongley/followers","following_url":"https://api.github.com/users/dlongley/following{/other_user}","gists_url":"https://api.github.com/users/dlongley/gists{/gist_id}","starred_url":"https://api.github.com/users/dlongley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlongley/subscriptions","organizations_url":"https://api.github.com/users/dlongley/orgs","repos_url":"https://api.github.com/users/dlongley/repos","events_url":"https://api.github.com/users/dlongley/events{/privacy}","received_events_url":"https://api.github.com/users/dlongley/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T13:59:50Z","updated_at":"2016-04-26T13:59:50Z","body":"To add -- I'd like to see an API where Web-based Payment Apps receive a payment request and Promise that they need to resolve to a payment response. So resolving that Promise is what I'd expect to be the way you send your result rather than an explicit call like `submitPaymentResponse`."}}