{"id":300324,"date":"2020-03-18T15:00:25","date_gmt":"2020-03-18T15:00:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300324"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300324","title":{"rendered":"\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u043e\u043f\u0438\u043d\u0433 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Payment Request API \u0438 Angular"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/492700\/\">\u041a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0432\u044b \u043f\u043b\u0430\u0442\u0438\u043b\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Pay, Apple Pay \u0438\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043a\u0430\u0440\u0442\u043e\u0439?<\/p>\n<p>  \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e.<\/p>\n<p>  \u0414\u0430\u0436\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442: \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u043d\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u043e\u0447\u043a\u0443. \u0410 \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u043a\u043e\u0440\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043a\u0430\u0440\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0435\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0434\u0435\u043d\u044c \u044f \u0437\u0430\u0445\u043e\u0447\u0443 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>  \u042d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0435\u0448\u044c \u043e\u0431 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0435: \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 Payment Request API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j5\/l-\/xu\/j5l-xuoz7wyv3vzymk_t1txb3yk.png\"><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041e \u0447\u0435\u043c \u0440\u0435\u0447\u044c?<\/h2>\n<p>  <a href=\"https:\/\/caniuse.com\/#feat=payment-request\">\u041f\u043e\u0447\u0442\u0438<\/a> \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/www.w3.org\/TR\/payment-request\/\">Payment Request API<\/a>. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0435\u0436 \u0432 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 Chrome \u0441 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u043e\u0439 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zp\/u2\/m2\/zpu2m2tovaltoiuinotdhzt4nmc.png\"><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0442\u0430\u043a \u2014 \u0432 Safari \u043f\u0440\u0438 \u043e\u043f\u043b\u0430\u0442\u0435 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u043c \u043f\u0430\u043b\u044c\u0446\u0430 \u0447\u0435\u0440\u0435\u0437 Apple Pay:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dw\/xh\/jj\/dwxhjjwweobgodqsv4clb4epyx8.jpeg\"><\/p>\n<p>  \u042d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e: \u043e\u043a\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0437\u0430\u043a\u0430\u0437\u0443 \u0438 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0442\u043e\u0432\u0430\u0440\u0430\u043c \u0438 \u0443\u0441\u043b\u0443\u0433\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435. \u0412\u0441\u0435 \u044d\u0442\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0445\u043e\u0442\u044f \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e API \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043f\u043e\u0440\u043d\u043e\u0435.<\/p>\n<h2>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Angular?<\/h2>\n<p>  Angular \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Payment Request API. \u0421\u0430\u043c\u044b\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0432 Angular: \u0434\u043e\u0441\u0442\u0430\u0442\u044c Document \u0438\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 Dependency Injection, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442 Window \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 window.PaymentRequest.<\/p>\n<pre><code class=\"javascript\">import {DOCUMENT} from '@angular\/common'; import {Inject, Injectable} from '@angular\/core';   @Injectable() export class PaymentService {    constructor(        @Inject(DOCUMENT)        private readonly documentRef: Document,    ) {}      pay(        methodData: PaymentMethodData[],        details: PaymentDetailsInit,        options: PaymentOptions = {},    ): Promise&lt;PaymentResponse&gt; {        if (            this.documentRef.defaultView === null ||            !('PaymentRequest' in this.documentRef.defaultView)        ) {            return Promise.reject(new Error('PaymentRequest is not supported'));        }          const gateway = new PaymentRequest(methodData, details, options);          return gateway            .canMakePayment()            .then(canPay =&gt;                canPay                    ? gateway.show()                    : Promise.reject(                          new Error('Payment Request cannot make the payment'),                      ),            );    } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Payment Request \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u044f\u0432\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439: \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u044f\u0436\u0435\u043b\u0435\u0435, \u0432 SSR \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0437\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e Payment Request \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f \u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0437\u044f\u0442\u044c \u0442\u043e\u043a\u0435\u043d <i>WINDOW<\/i> \u0438\u0437 <a href=\"https:\/\/github.com\/ng-web-apis\/common\">@ng-web-apis\/common<\/a>, \u0447\u0442\u043e\u0431\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 DI. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0439 <i>PAYMENT_REQUEST_SUPPORT<\/i>. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Payment Request API \u043f\u0435\u0440\u0435\u0434 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 API \u0432 \u0441\u0440\u0435\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442.<\/p>\n<pre><code class=\"javascript\">export const PAYMENT_REQUEST_SUPPORT = new InjectionToken&lt;boolean&gt;(    'Is Payment Request Api supported?',    {        factory: () =&gt; !!inject(WINDOW).PaymentRequest,    }, ); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">export class PaymentRequestService {    constructor(        @Inject(PAYMENT_REQUEST_SUPPORT) private readonly supported: boolean,        ...     ) {}       request(...): Promise&lt;PaymentResponse&gt; {        if (!this.supported) {            return Promise.reject(                new Error('Payment Request is not supported in your browser'),            );        }        ...    } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0442\u0438\u043b\u0435 Angular<\/h2>\n<p>  \u0421 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438, \u043d\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0443\u0440\u043e\u0432\u043d\u0435 \u00ab\u0433\u043e\u043b\u043e\u0433\u043e\u00bb API-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430: \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0438\u0445 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043f\u043b\u0430\u0442\u0435\u0436\u0430.<\/p>\n<p>  \u041d\u043e \u0432 \u043c\u0438\u0440\u0435 \u0410\u043d\u0433\u0443\u043b\u044f\u0440\u0430 \u043c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u043a \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f\u043c: \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c, \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u043c \u0438 \u0441\u0442\u0440\u0438\u043c\u0430\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Payment Request API \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043f\u0440\u043e\u0449\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z6\/2s\/1u\/z62s1ulbagd5qj3rcloaqpnk2sy.gif\"><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u0440\u0437\u0438\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">&lt;div waPayment [paymentTotal]=&quot;total&quot;&gt;    &lt;div        *ngFor=&quot;let cartItem of shippingCart&quot;        waPaymentItem        [paymentLabel]=&quot;cartItem.label&quot;        [paymentAmount]=&quot;cartItem.amount&quot;    &gt;        {{ cartItem.label }} ({{ cartItem.amount.value }} {{ cartItem.amount.currency }})    &lt;\/div&gt;      &lt;b&gt;Total:&lt;\/b&gt;  {{ totalSum }} \u20bd      &lt;button        [disabled]=&quot;shippingCart.length === 0&quot;        (waPaymentSubmit)=&quot;onPayment($event)&quot;        (waPaymentError)=&quot;onPaymentError($event)&quot;    &gt;        Buy    &lt;\/button&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0440\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u043c:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/ng-web-apis\/payment-request\/blob\/master\/projects\/payment-request\/src\/directives\/payment\/payment.directive.ts\">waPayment<\/a> \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/www.w3.org\/TR\/payment-request\/#paymentitem-dictionary\">PaymentItem<\/a> \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0438 \u0435\u0433\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439<\/li>\n<li>\u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <a href=\"https:\/\/github.com\/ng-web-apis\/payment-request\/blob\/master\/projects\/payment-request\/src\/directives\/payment-item\/payment-item.directive.ts\">waPaymentItem<\/a>. \u0418\u043d\u043f\u0443\u0442\u044b \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/www.w3.org\/TR\/payment-request\/#paymentitem-dictionary\">PaymentItem<\/a> \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e.<\/li>\n<li>\u041d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e Payment Request API \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041e\u0442\u0432\u0435\u0442\u043e\u043c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/PaymentResponse\">PaymentResponse<\/a> \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <a href=\"https:\/\/github.com\/ng-web-apis\/payment-request\/blob\/master\/projects\/payment-request\/src\/directives\/payment-submit\/payment-submit.directive.ts\">waPaymentSubmit<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0430\u043d\u0433\u0443\u043b\u044f\u0440\u043e\u0432\u0441\u043a\u0438\u043c\u0438 \u0430\u0443\u0442\u043f\u0443\u0442\u0430\u043c\u0438.  <\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u041f\u0440\u0438\u0447\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043d \u043f\u043e \u0432\u0441\u0435\u043c \u043a\u0430\u043d\u043e\u043d\u0430\u043c Angular Way. <\/p>\n<p>  \u0421\u0430\u043c\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ul>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ContentChildren \u0438 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 PaymentDetailsInit \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Payment Request API.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">@Directive({    selector: '[waPayment][paymentTotal]', }) export class PaymentDirective implements PaymentDetailsInit {    ...    @ContentChildren(PaymentItemDirective)    set paymentItems(items: QueryList&lt;PaymentItem&gt;) {        this.displayItems = items.toArray();    }      displayItems?: PaymentItem[]; } <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430-\u0430\u0443\u0442\u043f\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043b\u0438\u043a\u0438 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 \u0438 \u044d\u043c\u0438\u0442\u0438\u0442 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 Dependency Injection, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f DI-\u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">@Directive({    selector: '[waPaymentSubmit]', }) export class PaymentSubmitDirective {    @Output()    waPaymentSubmit: Observable&lt;PaymentResponse&gt;;      @Output()    waPaymentError: Observable&lt;Error | DOMException&gt;;      constructor(        @Inject(PaymentDirective) paymentHost: PaymentDetailsInit,        @Inject(PaymentRequestService) paymentRequest: PaymentRequestService,        @Inject(ElementRef) {nativeElement}: ElementRef,        @Inject(PAYMENT_METHODS) methods: PaymentMethodData[],        @Inject(PAYMENT_OPTIONS) options: PaymentOptions,    ) {        const requests$ = fromEvent(nativeElement, 'click').pipe(            switchMap(() =&gt;                from(paymentRequest.request({...paymentHost}, methods, options)).pipe(                    catchError(error =&gt; of(error)),                ),            ),            share(),        );          this.waPaymentSubmit = requests$.pipe(filter(response =&gt; !isError(response)));        this.waPaymentError = requests$.pipe(filter(isError));    } } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/www.npmjs.com\/package\/@ng-web-apis\/payment-request\">@ng-web-apis\/payment-request<\/a>:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/ng-web-apis\/payment-request\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430 GitHub.<\/a><\/li>\n<li><a href=\"https:\/\/ng-web-apis.github.io\/payment-request\">\u0414\u0435\u043c\u043e\u043f\u0440\u0438\u043c\u0435\u0440<\/a>, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u0438 \u0433\u0438\u0444\u043a\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Payment Request API \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441, \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<p>  \u042d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c \u043e\u0442 @ng-web-apis \u2014 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0439\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u0435\u0433\u043a\u0438\u0445 Angular-\u043e\u0431\u0435\u0440\u0442\u043e\u043a \u0434\u043b\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 Web API, \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435. \u041d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/ng-web-apis.github.io\/\">\u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 API<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 Angular \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0441.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/492700\/\"> https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/492700\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/492700\/\">\u041a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0432\u044b \u043f\u043b\u0430\u0442\u0438\u043b\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Pay, Apple Pay \u0438\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043a\u0430\u0440\u0442\u043e\u0439?<\/p>\n<p>  \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e.<\/p>\n<p>  \u0414\u0430\u0436\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442: \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u043d\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u043e\u0447\u043a\u0443. \u0410 \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u043a\u043e\u0440\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043a\u0430\u0440\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0435\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0434\u0435\u043d\u044c \u044f \u0437\u0430\u0445\u043e\u0447\u0443 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>  \u042d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0435\u0448\u044c \u043e\u0431 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0435: \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 Payment Request API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j5\/l-\/xu\/j5l-xuoz7wyv3vzymk_t1txb3yk.png\">  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-300324","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300324"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300324\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}