{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/234024823","pull_request_review_id":175577096,"id":234024823,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDAyNDgyMw==","diff_hunk":"@@ -0,0 +1,517 @@\n+/** @format */\n+\n+/**\n+ * External dependencies\n+ */\n+\n+import PropTypes from 'prop-types';\n+import React from 'react';\n+import { localize } from 'i18n-calypso';\n+import config from 'config';\n+import Gridicon from 'gridicons';\n+import debugFactory from 'debug';\n+\n+/**\n+ * Internal dependencies\n+ */\n+import Button from 'components/button';\n+import SubscriptionText from 'my-sites/checkout/checkout/subscription-text';\n+import PaymentCountrySelect from 'components/payment-country-select';\n+import Input from 'my-sites/domains/components/form/input';\n+import TermsOfService from './terms-of-service';\n+import cartValues from 'lib/cart-values';\n+import wpcom from 'lib/wp';\n+import { newCardPayment } from 'lib/store-transactions';\n+import { setPayment } from 'lib/upgrades/actions';\n+import {\n+\tBEFORE_SUBMIT,\n+\tINPUT_VALIDATION,\n+\tRECEIVED_PAYMENT_KEY_RESPONSE,\n+\tRECEIVED_WPCOM_RESPONSE,\n+\tSUBMITTING_PAYMENT_KEY_REQUEST,\n+\tSUBMITTING_WPCOM_REQUEST,\n+} from 'lib/store-transactions/step-types';\n+\n+const debug = debugFactory( 'calypso:checkout:payment:apple-pay' );\n+\n+/**\n+ * Web Payment method identifier.\n+ */\n+export const WEB_PAYMENT_BASIC_CARD_METHOD = 'basic-card';\n+export const WEB_PAYMENT_APPLE_PAY_METHOD = 'https://apple.com/apple-pay';\n+\n+/**\n+ * Supported card types.\n+ */\n+const SUPPORTED_NETWORKS = [ 'visa', 'mastercard', 'discover', 'amex', 'jcb', 'maestro' ];\n+const APPLE_PAY_MERCHANT_IDENTIFIER = config( 'apple_pay_merchant_id' );\n+const PAYMENT_REQUEST_OPTIONS = {\n+\trequestPayerName: true,\n+\trequestPayerPhone: false,\n+\trequestPayerEmail: false,\n+\trequestShipping: false,\n+};\n+\n+/**\n+ * Returns an available Web Payment method.\n+ *\n+ * Web Payments (`PaymentRequest` API) are available only if the\n+ * document is served through HTTPS.\n+ *\n+ * The configuration features `my-sites/checkout/web-payment/*` must\n+ * also be enabled.\n+ *\n+ * @returns {string|null}  One of the `WEB_PAYMENT_*_METHOD` or `null`\n+ *                         if none can be detected.\n+ */\n+export function detectWebPaymentMethod() {\n+\tif ( ! config.isEnabled( 'my-sites/checkout/web-payment' ) ) {\n+\t\treturn null;\n+\t}\n+\n+\tif (\n+\t\tconfig.isEnabled( 'my-sites/checkout/web-payment/apple-pay' ) &&\n+\t\twindow.ApplePaySession &&\n+\t\twindow.ApplePaySession.canMakePayments()\n+\t) {\n+\t\treturn WEB_PAYMENT_APPLE_PAY_METHOD;\n+\t}\n+\n+\tif ( config.isEnabled( 'my-sites/checkout/web-payment/basic-card' ) && window.PaymentRequest ) {\n+\t\treturn WEB_PAYMENT_BASIC_CARD_METHOD;\n+\t}\n+\n+\treturn null;\n+}\n+\n+/**\n+ * Returns a user-friendly Web Payment method name.\n+ *\n+ * @param {string|null} webPaymentMethod  The payment method identifier\n+ *                                        (expecting one of the\n+ *                                        `WEB_PAYMENT_*_METHOD`\n+ *                                        constant).\n+ * @returns {string|null}                 A user-friendly payment name\n+ *                                        or the given payment method\n+ *                                        if none matches.\n+ */\n+export function getWebPaymentMethodName( webPaymentMethod ) {\n+\tswitch ( webPaymentMethod ) {\n+\t\tcase WEB_PAYMENT_BASIC_CARD_METHOD:\n+\t\t\treturn 'Browser wallet';\n+\n+\t\tcase WEB_PAYMENT_APPLE_PAY_METHOD:\n+\t\t\treturn 'Apple Pay';\n+\n+\t\tdefault:\n+\t\t\treturn webPaymentMethod;\n+\t}\n+}\n+\n+/**\n+ * The `<WebPaymentBox />` component.\n+ */\n+export class WebPaymentBox extends React.Component {\n+\tstatic propTypes = {\n+\t\tcart: PropTypes.object.isRequired,\n+\t\ttransaction: PropTypes.object.isRequired,\n+\t\ttransactionStep: PropTypes.object.isRequired,\n+\t\tcountriesList: PropTypes.array.isRequired,\n+\t\tonSubmit: PropTypes.func.isRequired,\n+\t\ttranslate: PropTypes.func.isRequired,\n+\t};\n+\n+\tstate = {\n+\t\tcountry: null,\n+\t\tpostalCode: null,\n+\t};\n+\n+\t/**\n+\t * @return {object} A dictionnary containing `default`, `disabled` and `text` keys.\n+\t */\n+\tbuttonState = () => {\n+\t\tconst { transactionStep, translate } = this.props;\n+\n+\t\tconst defaultState = () => {\n+\t\t\treturn {\n+\t\t\t\tdefault: true,\n+\t\t\t\tdisabled: false,\n+\t\t\t\ttext: translate( 'Select a payment card', {\n+\t\t\t\t\tcontext: 'Loading state on /checkout',\n+\t\t\t\t} ),\n+\t\t\t};\n+\t\t};\n+\t\tconst ongoingState = () => {\n+\t\t\treturn {\n+\t\t\t\tdefault: false,\n+\t\t\t\tdisabled: true,\n+\t\t\t\ttext: translate( 'Sending your purchase', {\n+\t\t\t\t\tcontext: 'Loading state on /checkout',\n+\t\t\t\t} ),\n+\t\t\t};\n+\t\t};\n+\t\tconst completingState = () => {\n+\t\t\treturn {\n+\t\t\t\tdefault: false,\n+\t\t\t\tdisabled: true,\n+\t\t\t\ttext: translate( 'Completing your purchase', {\n+\t\t\t\t\tcontext: 'Loading state on /checkout',\n+\t\t\t\t} ),\n+\t\t\t};\n+\t\t};\n+\n+\t\tswitch ( transactionStep.name ) {\n+\t\t\tcase BEFORE_SUBMIT:\n+\t\t\t\treturn defaultState();\n+\n+\t\t\tcase INPUT_VALIDATION:\n+\t\t\t\tif ( transactionStep.error ) {\n+\t\t\t\t\treturn defaultState();\n+\t\t\t\t}\n+\n+\t\t\t\treturn ongoingState();\n+\n+\t\t\tcase SUBMITTING_PAYMENT_KEY_REQUEST:\n+\t\t\t\treturn ongoingState();\n+\n+\t\t\tcase RECEIVED_PAYMENT_KEY_RESPONSE:\n+\t\t\t\tif ( transactionStep.error ) {\n+\t\t\t\t\treturn defaultState();\n+\t\t\t\t}\n+\n+\t\t\t\treturn ongoingState();\n+\n+\t\t\tcase SUBMITTING_WPCOM_REQUEST:\n+\t\t\t\treturn completingState();\n+\n+\t\t\tcase RECEIVED_WPCOM_RESPONSE:\n+\t\t\t\tif ( transactionStep.error || ! transactionStep.data.success ) {\n+\t\t\t\t\treturn defaultState();\n+\t\t\t\t}\n+\n+\t\t\t\treturn completingState();\n+\n+\t\t\tdefault:\n+\t\t\t\tthrow new Error( 'Unknown transaction step: ' + transactionStep.name );\n+\t\t}\n+\t};\n+\n+\t/**\n+\t * @return {PaymentRequest} A configured payment request object.\n+\t */\n+\tgetPaymentRequestForApplePay = () => {\n+\t\tconst { cart, translate } = this.props;\n+\n+\t\tconst supportedPaymentMethods = [\n+\t\t\t{\n+\t\t\t\tsupportedMethods: WEB_PAYMENT_APPLE_PAY_METHOD,\n+\t\t\t\tdata: {\n+\t\t\t\t\tversion: 3,\n+\t\t\t\t\tmerchantIdentifier: APPLE_PAY_MERCHANT_IDENTIFIER,\n+\t\t\t\t\tmerchantCapabilities: [ 'supports3DS', 'supportsCredit', 'supportsDebit' ],\n+\t\t\t\t\tsupportedNetworks: SUPPORTED_NETWORKS,\n+\t\t\t\t\tcountryCode: 'US',\n+\t\t\t\t},\n+\t\t\t},\n+\t\t];\n+\t\tconst paymentDetails = {\n+\t\t\ttotal: {\n+\t\t\t\tlabel: translate( 'Total' ),\n+\t\t\t\tamount: {\n+\t\t\t\t\tcurrency: cart.currency,\n+\t\t\t\t\tvalue: cart.total_cost + '',\n+\t\t\t\t},\n+\t\t\t},\n+\t\t\tdisplayItems: cart.products.map( product => {\n+\t\t\t\treturn {\n+\t\t\t\t\tlabel: product.product_name,\n+\t\t\t\t\tamount: {\n+\t\t\t\t\t\tcurrency: product.currency,\n+\t\t\t\t\t\tvalue: product.cost + '',\n+\t\t\t\t\t},\n+\t\t\t\t};\n+\t\t\t} ),\n+\t\t};\n+\n+\t\tconst paymentRequest = new PaymentRequest(\n+\t\t\tsupportedPaymentMethods,\n+\t\t\tpaymentDetails,\n+\t\t\tPAYMENT_REQUEST_OPTIONS\n+\t\t);\n+\n+\t\tconst environment = 'production' === config( 'env' ) ? undefined : 'sandbox';\n+\n+\t\tpaymentRequest.onmerchantvalidation = event => {\n+\t\t\twpcom\n+\t\t\t\t.undocumented()\n+\t\t\t\t.applePayMerchantValidation( event.validationURL, environment )\n+\t\t\t\t.then( json => event.complete( json ) )\n+\t\t\t\t.catch( error => {\n+\t\t\t\t\tdebug( 'onmerchantvalidation error' );\n+\t\t\t\t\tdebug( error );\n+\t\t\t\t} );\n+\t\t};\n+\n+\t\treturn paymentRequest;\n+\t};\n+\n+\t/**\n+\t * @return {PaymentRequest} A configured payment request object.\n+\t */\n+\tgetPaymentRequestForBasicCard = () => {\n+\t\tconst { cart, translate } = this.props;\n+\n+\t\tconst supportedPaymentMethods = [\n+\t\t\t{\n+\t\t\t\tsupportedMethods: WEB_PAYMENT_BASIC_CARD_METHOD,\n+\t\t\t\tdata: {\n+\t\t\t\t\tsupportedNetworks: SUPPORTED_NETWORKS,\n+\t\t\t\t},\n+\t\t\t},\n+\t\t];\n+\t\tconst paymentDetails = {\n+\t\t\ttotal: {\n+\t\t\t\tlabel: translate( 'Total' ),\n+\t\t\t\tamount: {\n+\t\t\t\t\tcurrency: cart.currency,\n+\t\t\t\t\tvalue: cart.total_cost,\n+\t\t\t\t},\n+\t\t\t},\n+\t\t\tdisplayItems: cart.products.map( product => {\n+\t\t\t\treturn {\n+\t\t\t\t\tlabel: product.product_name,\n+\t\t\t\t\tamount: {\n+\t\t\t\t\t\tcurrency: product.currency,\n+\t\t\t\t\t\tvalue: product.cost,\n+\t\t\t\t\t},\n+\t\t\t\t};\n+\t\t\t} ),\n+\t\t};\n+\n+\t\treturn new PaymentRequest( supportedPaymentMethods, paymentDetails, PAYMENT_REQUEST_OPTIONS );\n+\t};\n+\n+\t/**\n+\t * @param {string} paymentMethod  Payment method.\n+\t * @param {DOMEvent} event        Button even.\n+\t */\n+\tsubmit = ( paymentMethod, event ) => {\n+\t\tevent.persist();\n+\t\tevent.preventDefault();\n+\n+\t\tswitch ( paymentMethod ) {\n+\t\t\tcase WEB_PAYMENT_APPLE_PAY_METHOD:\n+\t\t\t\t{\n+\t\t\t\t\tconst paymentRequest = this.getPaymentRequestForApplePay();\n+\n+\t\t\t\t\ttry {\n+\t\t\t\t\t\tpaymentRequest\n+\t\t\t\t\t\t\t.show()\n+\t\t\t\t\t\t\t.then( paymentResponse => {\n+\t\t\t\t\t\t\t\tconst { payerName, details } = paymentResponse;\n+\t\t\t\t\t\t\t\tconst { token } = details;\n+\n+\t\t\t\t\t\t\t\tif ( 'EC_v1' !== token.paymentData.version ) {\n+\t\t\t\t\t\t\t\t\treturn; // Not supported yet.\n+\t\t\t\t\t\t\t\t}\n+\n+\t\t\t\t\t\t\t\tthis.props.transaction.payment = newCardPayment( {\n+\t\t\t\t\t\t\t\t\ttokenized_payment_data: token.paymentData,\n+\t\t\t\t\t\t\t\t\tname: payerName,\n+\t\t\t\t\t\t\t\t\tcountry: this.state.country,\n+\t\t\t\t\t\t\t\t\t'postal-code': this.state.postalCode,\n+\t\t\t\t\t\t\t\t\tcard_brand: token.paymentMethod.network,\n+\t\t\t\t\t\t\t\t} );\n+\n+\t\t\t\t\t\t\t\tsetPayment( this.props.transaction.payment );\n+\n+\t\t\t\t\t\t\t\tthis.props.onSubmit( event );\n+\n+\t\t\t\t\t\t\t\tpaymentResponse.complete( 'success' );\n+\t\t\t\t\t\t\t} )\n+\t\t\t\t\t\t\t.catch( error => {\n+\t\t\t\t\t\t\t\tdebug( 'show error' );\n+\t\t\t\t\t\t\t\tdebug( error );\n+\t\t\t\t\t\t\t} );\n+\t\t\t\t\t} catch ( e ) {\n+\t\t\t\t\t\tdebug( 'show catch' );\n+\t\t\t\t\t\tdebug( e );\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\tbreak;\n+\n+\t\t\tcase WEB_PAYMENT_BASIC_CARD_METHOD:\n+\t\t\t\t{\n+\t\t\t\t\tconst paymentRequest = this.getPaymentRequestForBasicCard();\n+\n+\t\t\t\t\ttry {\n+\t\t\t\t\t\tpaymentRequest\n+\t\t\t\t\t\t\t.show()\n+\t\t\t\t\t\t\t.then( paymentResponse => {\n+\t\t\t\t\t\t\t\tconst { details } = paymentResponse;\n+\t\t\t\t\t\t\t\tconst { billingAddress } = details;\n+\n+\t\t\t\t\t\t\t\tconst cardRawDetails = {\n+\t\t\t\t\t\t\t\t\tnumber: details.cardNumber,\n+\t\t\t\t\t\t\t\t\tcvv: details.cardSecurityCode,\n+\t\t\t\t\t\t\t\t\t'expiration-date': details.expiryMonth + '/' + details.expiryYear.substr( 2 ),\n+\t\t\t\t\t\t\t\t\tname: details.cardholderName,\n+\t\t\t\t\t\t\t\t\tcountry: billingAddress.country,\n+\t\t\t\t\t\t\t\t\t'postal-code': billingAddress.postalCode,\n+\t\t\t\t\t\t\t\t};\n+\n+\t\t\t\t\t\t\t\tthis.props.transaction.payment = newCardPayment( cardRawDetails );\n+\n+\t\t\t\t\t\t\t\tpaymentResponse.complete();\n+\n+\t\t\t\t\t\t\t\treturn this.props.transaction.payment;\n+\t\t\t\t\t\t\t} )\n+\t\t\t\t\t\t\t.then( transactionPayment => {\n+\t\t\t\t\t\t\t\tsetPayment( transactionPayment );\n+\t\t\t\t\t\t\t\tthis.props.onSubmit( event );\n+\t\t\t\t\t\t\t} )\n+\t\t\t\t\t\t\t.catch( error => {\n+\t\t\t\t\t\t\t\tdebug( error );\n+\t\t\t\t\t\t\t} );\n+\t\t\t\t\t} catch ( e ) {\n+\t\t\t\t\t\tdebug( e );\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\tbreak;\n+\n+\t\t\tdefault:\n+\t\t\t\tdebug( 'Unknown or unhandled payment method `' + paymentMethod + '`.' );\n+\t\t}\n+\t};\n+\n+\t/**\n+\t * @param {string} key    Should only be `country`.\n+\t * @param {string} value  Should only be a country name.\n+\t */\n+\tupdateSelectedCountry = ( key, value ) => {\n+\t\tif ( 'country' === key ) {\n+\t\t\tthis.setState( { country: value } );\n+\t\t}\n+\t};\n+\n+\t/**\n+\t * @param {object} event  Event object.\n+\t */\n+\tupdateSelectedPostalCode = event => {\n+\t\tconst { name: key, value } = event.target;\n+\n+\t\tif ( 'postal-code' === key ) {\n+\t\t\tthis.setState( { postalCode: value } );\n+\t\t}\n+\t};\n+\n+\trender() {\n+\t\tconst paymentMethod = detectWebPaymentMethod();\n+\t\tconst { cart, translate, countriesList } = this.props;\n+\n+\t\tif ( ! paymentMethod ) {\n+\t\t\treturn <></>;\n+\t\t}\n+\n+\t\tconst buttonState = this.buttonState();\n+\t\tconst buttonDisabled = buttonState.disabled || ! this.state.country || ! this.state.postalCode;\n+\t\tlet introductionText;\n+\t\tlet button;\n+\n+\t\tswitch ( paymentMethod ) {\n+\t\t\tcase WEB_PAYMENT_APPLE_PAY_METHOD:\n+\t\t\t\tintroductionText = translate(\n+\t\t\t\t\t'Use your secure and private Apple Wallet to pick up a card to pay with. ' +","path":"client/my-sites/checkout/checkout/web-payment-box.jsx","position":424,"original_position":424,"commit_id":"309e91bb64aacb4c6e7aad2cb1695fe2f967ea70","original_commit_id":"b93821b4c5774dba6324d53cd1e384989f2b31b2","user":{"login":"Hywan","id":946104,"node_id":"MDQ6VXNlcjk0NjEwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/946104?v=4","gravatar_id":"","url":"https://api.github.com/users/Hywan","html_url":"https://github.com/Hywan","followers_url":"https://api.github.com/users/Hywan/followers","following_url":"https://api.github.com/users/Hywan/following{/other_user}","gists_url":"https://api.github.com/users/Hywan/gists{/gist_id}","starred_url":"https://api.github.com/users/Hywan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hywan/subscriptions","organizations_url":"https://api.github.com/users/Hywan/orgs","repos_url":"https://api.github.com/users/Hywan/repos","events_url":"https://api.github.com/users/Hywan/events{/privacy}","received_events_url":"https://api.github.com/users/Hywan/received_events","type":"User","site_admin":false},"body":"@rralian has suggested to remove the text. Removed.","created_at":"2018-11-15T22:01:16Z","updated_at":"2018-11-15T22:01:16Z","html_url":"https://github.com/Automattic/wp-calypso/pull/27981#discussion_r234024823","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/234024823"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/27981#discussion_r234024823"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981"}},"in_reply_to_id":234003732},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981","id":224621534,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NjIxNTM0","html_url":"https://github.com/Automattic/wp-calypso/pull/27981","diff_url":"https://github.com/Automattic/wp-calypso/pull/27981.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/27981.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/27981","number":27981,"state":"open","locked":false,"title":"feat(web-payment) Enable Web Payment (incl. Apple Pay and `basic-card`)","user":{"login":"Hywan","id":946104,"node_id":"MDQ6VXNlcjk0NjEwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/946104?v=4","gravatar_id":"","url":"https://api.github.com/users/Hywan","html_url":"https://github.com/Hywan","followers_url":"https://api.github.com/users/Hywan/followers","following_url":"https://api.github.com/users/Hywan/following{/other_user}","gists_url":"https://api.github.com/users/Hywan/gists{/gist_id}","starred_url":"https://api.github.com/users/Hywan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hywan/subscriptions","organizations_url":"https://api.github.com/users/Hywan/orgs","repos_url":"https://api.github.com/users/Hywan/repos","events_url":"https://api.github.com/users/Hywan/events{/privacy}","received_events_url":"https://api.github.com/users/Hywan/received_events","type":"User","site_admin":false},"body":"Replaces #27955.\r\n\r\nThis PR is one step over four to implement Web Payment, and in particular Apple Pay, in the checkout.\r\n\r\nThe other three steps happen in WPCOM, in Paygate, and in MoneyPress.\r\n\r\nTo test the PR, see the master thread in p8hgLy-16d-p2.\r\n\r\nSome screenshots of the end results:\r\n\r\n<img width=\"796\" alt=\"screenshot 2018-11-15 at 11 26 18\" src=\"https://user-images.githubusercontent.com/946104/48581169-0e53c980-e8ef-11e8-8c0d-2b8ea9de5568.png\">\r\n<img width=\"792\" alt=\"screenshot 2018-11-15 at 11 26 49\" src=\"https://user-images.githubusercontent.com/946104/48581170-0e53c980-e8ef-11e8-86a0-16b5f8cb7dca.png\">\r\n","created_at":"2018-10-22T08:54:50Z","updated_at":"2018-11-15T22:01:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0bcd24766639c5c012bfc1340a387c16d836fd4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":285010121,"node_id":"MDU6TGFiZWwyODUwMTAxMjE=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Checkout","name":"Checkout","color":"006b75","default":false},{"id":430028306,"node_id":"MDU6TGFiZWw0MzAwMjgzMDY=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Payment%20Methods","name":"Payment Methods","color":"006b75","default":false},{"id":285010008,"node_id":"MDU6TGFiZWwyODUwMTAwMDg=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Pri]%20Normal","name":"[Pri] Normal","color":"f9d0c4","default":false},{"id":285010017,"node_id":"MDU6TGFiZWwyODUwMTAwMTc=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20In%20Progress","name":"[Status] In Progress","color":"207de5","default":false},{"id":838866001,"node_id":"MDU6TGFiZWw4Mzg4NjYwMDE=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20e2e%20Testing","name":"[Status] Needs e2e Testing","color":"ed74b2","default":false},{"id":967395211,"node_id":"MDU6TGFiZWw5NjczOTUyMTE=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20New%20feature","name":"[Type] New feature","color":"c7def8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/27981/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/309e91bb64aacb4c6e7aad2cb1695fe2f967ea70","head":{"label":"Automattic:web-payment-reboot","ref":"web-payment-reboot","sha":"309e91bb64aacb4c6e7aad2cb1695fe2f967ea70","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","private":false,"owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-11-15T20:22:06Z","pushed_at":"2018-11-15T21:44:51Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":117510,"stargazers_count":10592,"watchers_count":10592,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1498,"mirror_url":null,"archived":false,"open_issues_count":1670,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1498,"open_issues":1670,"watchers":10592,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"c7041f37e96424a7c587a03c9fb90086522a3258","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","private":false,"owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-11-15T20:22:06Z","pushed_at":"2018-11-15T21:44:51Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":117510,"stargazers_count":10592,"watchers_count":10592,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1498,"mirror_url":null,"archived":false,"open_issues_count":1670,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1498,"open_issues":1670,"watchers":10592,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/27981"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/27981"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/27981/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/27981/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/309e91bb64aacb4c6e7aad2cb1695fe2f967ea70"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Hywan"}}