{"id":264926,"date":"2015-09-04T11:01:02","date_gmt":"2015-09-04T07:01:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=264926"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=264926","title":{"rendered":"\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 Paypal \u0432 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435"},"content":{"rendered":"<p>             \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Paypal \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0430 PHP, \u043d\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0431\u0440\u0430\u043d \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c\u044e. \u042d\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0435 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 Paypal \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0417\u043d\u0430\u0442\u043e\u043a\u0438 Paypal \u0432\u0440\u044f\u0434 \u043b\u0438 \u043d\u0430\u0439\u0434\u0443\u0442 \u0437\u0434\u0435\u0441\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435. \u041d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d\u0438 \u0443\u043a\u0430\u0436\u0443\u0442 \u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043b\u0438 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u0443\u044e\u0442, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f business \u0430\u043a\u043a\u0430\u0443\u043d\u0442. PayPal Payments Standard \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<br \/>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e <a href=\"https:\/\/www.paypal.com\/us\/signup\/account\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 sandbox \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Paypal Sandbox. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f 2 sandbox \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f(buyer) \u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u0430(facilitator). \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 sandbox \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 paypal \u0432 <a href=\"https:\/\/developer.paypal.com\/\">\u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/a>. \u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f, \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 <a href=\"https:\/\/developer.paypal.com\/developer\/applications\">dashboard<\/a>. \u0412 \u043c\u0435\u043d\u044e \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b Sandbox, \u0432\u043a\u043b\u0430\u0434\u043a\u0443 accounts. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c 2 sandbox \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430(Buyer \u0438 Facilitator).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b71\/555\/f0b\/b71555f0bd58430ba0d0c138ad2e1802.jpg\"\/><\/p>\n<p>  \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 profile, \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435 \u043a\u043b\u0438\u043a\u0430\u0435\u043c change password, \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c. <br \/>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u0438 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/www.sandbox.paypal.com\">Paypal Sandbox<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Paypal<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Paypal Facilitator \u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 Sandbox, \u043b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e facilitator \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u044e profile, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0443\u043d\u043a\u0442 my selling tools. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/155\/927\/e64\/155927e64b2e4b1eb47c5b94da1a6bd9.jpg\"\/><\/p>\n<p>  \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Selling online \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0443\u043d\u043a\u0442 Website preferences, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Update. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 url. \u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 url (\u0441\u043c. \u043d\u0438\u0436\u0435). <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5cd\/d12\/0b5\/5cdd120b5b0648a8ad69d5b1304a5024.jpg\"\/><\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c Paypal Instant Payment Notifications. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Getting paid and managing my risk \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0443\u043d\u043a\u0442 Instant payment notifications \u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Update.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d17\/0e4\/50b\/d170e450b286443f996b7e8404bc5121.jpg\"\/><\/p>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 IPN \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c URL, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0448 IPN Listener. \u042d\u0442\u043e\u0442 URL \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0442.\u043a. \u043d\u0430 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4b4\/2dd\/8e2\/4b42dd8e212d4f08973b5a858d1e269f.jpg\"\/><\/p>\n<p>  \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c Message delivery \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u0441\u044f. \u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<h2>\u0420\u0430\u0437\u043e\u0432\u044b\u0435 \u041f\u043b\u0430\u0442\u0435\u0436\u0438<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0438. \u042d\u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043a\u0443\u043f\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u043e\u0432\u0430\u0440 \u0438\u043b\u0438 \u0440\u0430\u0437\u043e\u0432\u0443\u044e \u0443\u0441\u043b\u0443\u0433\u0443. \u041d\u0443 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 paypal. \u0421\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0446\u0435\u043d\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0431\u044b \u0432 \u0431\u0430\u0437\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0445 \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u043d\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/developer.paypal.com\/docs\/integration\/web\/\">Payment Buttons (PayPal Payments Standard)<\/a>.<\/p>\n<h2>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<p>  \u041d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u043d\u044f\u0442\u044c \u0446\u0435\u043d\u0443 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u0438\u043b\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043d\u044f \u043d\u0435\u0434\u0435\u043b\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<p>  \u0418\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0437\u0430\u043a\u0430\u0437 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.<\/p>\n<p>  products \u2014 \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b:<\/p>\n<table>\n<tr>\n<td>id<\/td>\n<td>name<\/td>\n<td>price<\/td>\n<td>description<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Product 1<\/td>\n<td>1.0<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Product 2<\/td>\n<td>4.0<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/table>\n<p>  users \u2014 \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<table>\n<tr>\n<td>id<\/td>\n<td>firstname<\/td>\n<td>lastname<\/td>\n<td>email<\/td>\n<td>password<\/td>\n<\/tr>\n<tr>\n<td>315<\/td>\n<td>Alan<\/td>\n<td>Smith<\/td>\n<td>alansmith@example.com<\/td>\n<td>$1$2z4.hu5.$E3A3H6csEPDBoH8VYK3AB0<\/td>\n<\/tr>\n<tr>\n<td>316<\/td>\n<td>Joe<\/td>\n<td>Doe<\/td>\n<td>joedoe@example.com<\/td>\n<td>$1$Kd4.Lf0.$pGc1h7vwmy9N6EJxac953\/<\/td>\n<\/tr>\n<\/table>\n<p>  products_users \u2014 \u043a\u043e\u043c\u0443 \u043c\u044b \u0438 \u0447\u0442\u043e \u043e\u0442\u0433\u0440\u0443\u0437\u0438\u043b\u0438:<\/p>\n<table>\n<tr>\n<td>id<\/td>\n<td>user_id<\/td>\n<td>product_id<\/td>\n<td>items_count<\/td>\n<td>created_date<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>315<\/td>\n<td>1<\/td>\n<td>3<\/td>\n<td>2015-09-03 08:23:05<\/td>\n<\/tr>\n<\/table>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 transactions:<\/p>\n<table>\n<tr>\n<td>txn_id<\/td>\n<td>txn_type<\/td>\n<td>mc_gross<\/td>\n<td>mc_currency<\/td>\n<td>quantity<\/td>\n<td>payment_date<\/td>\n<td>payment_status<\/td>\n<td>business<\/td>\n<td>receiver_email<\/td>\n<td>payer_id<\/td>\n<td>payer_email<\/td>\n<td>relation_id<\/td>\n<td>relation_type<\/td>\n<td>created_date<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h2>\u0424\u043e\u0440\u043c\u0430 \u043e\u043f\u043b\u0430\u0442\u044b<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u043e\u0440\u043c\u0443 \u0437\u0430\u043a\u0430\u0437\u0430. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u043e\u0440\u043c\u0443 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0433\u0434\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043a\u0430\u0437\u0430(\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430, \u0446\u0435\u043d\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e).<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0446\u0435\u043d\u0443, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0442.\u0434. \u041f\u043e\u043b\u0435 custom \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c id \u0442\u043e\u0432\u0430\u0440\u0430, id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0440\u0443\u0433\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043d\u0430\u043c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430.<br \/>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c json \u0438\u043b\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432\u0438\u0434\u0430 on0, on1, os0 and os1. \u041b\u0438\u0447\u043d\u043e \u044f \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u043b <a href=\"http:\/\/www.brianmoreau.com\/articles\/paypal_buy_now_button_sending_custom_variables.php\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0444\u043e\u0440\u043c\u044b:<\/p>\n<pre><code class=\"php\">&lt;?php $payNowButtonUrl = 'https:\/\/www.sandbox.paypal.com\/cgi-bin\/websc'; $userId = 315 \/\/ id \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  $receiverEmail = 'xxx-facilitator@yandex.ru'; \/\/email \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430(\u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u0440\u0435\u0433\u0435\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d paypal \u0430\u043a\u043a\u0430\u0443\u043d\u0442)   $productId = 1; $itemName = 'Product 1';\t\/\/ \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 $amount = '1.0'; \/\/ \u0446\u0435\u043d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430(\u0437\u0430 1 \u0448\u0442.) $quantity = 3;\t\/\/ \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e  $returnUrl = 'http:\/\/your-site.com\/single_payment?status=paymentSuccess'; $customData = ['user_id' =&gt; $userId, 'product_id' =&gt; $productId]; ?&gt;  &lt;form action=&quot;&lt;?php echo $payNowButtonUrl; ?&gt;&quot; method=&quot;post&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_xclick&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;&lt;?php echo $receiverEmail; ?&gt;&quot;&gt;     &lt;input id=&quot;paypalItemName&quot; type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;&lt;?php echo $itemName; ?&gt;&quot;&gt;     &lt;input id=&quot;paypalQuantity&quot; type=&quot;hidden&quot; name=&quot;quantity&quot; value=&quot;&lt;?php echo $quantity; ?&gt;&quot;&gt;     &lt;input id=&quot;paypalAmmount&quot; type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;&lt;?php echo $amount; ?&gt;&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;1&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;&lt;?php echo $returnUrl; ?&gt;&quot;&gt;      &lt;input type=&quot;hidden&quot; name=&quot;custom&quot; value=&quot;&lt;?php echo json_encode($customData);?&gt;&quot;&gt;      &lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;lc&quot; value=&quot;US&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;bn&quot; value=&quot;PP-BuyNowBF&quot;&gt;      &lt;button type=&quot;submit&quot;&gt;         Pay Now             &lt;\/button&gt;  &lt;\/form&gt; <\/code><\/pre>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/developer.paypal.com\/docs\/classic\/paypal-payments-standard\/integration-guide\/Appx_websitestandard_htmlvariables\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e\u043f\u043b\u0430\u0442\u044b paypal, \u0433\u0434\u0435 \u043e\u043d \u0441\u043d\u043e\u0432\u0430 \u0432\u0438\u0434\u0438\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u0437\u0430\u043a\u0430\u0437\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3a9\/39f\/0f7\/3a939f0f70d54ea392f3e4d5a4872f4e.jpg\"\/><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e paypal \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u043a\u0430\u0440\u0442\u044b. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442(\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 return), \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h2>Instant Payment Notification(IPN)<\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b \u043f\u043b\u0430\u0442\u0435\u0436, Paypal \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 <a href=\"https:\/\/developer.paypal.com\/docs\/classic\/products\/instant-payment-notification\/\">Instant Payment Notification(IPN)<\/a>.<\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043d\u0430\u0448 Paypal \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 IPN Notification URL. \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c IPN listener, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c IPN \u0437\u0430\u043f\u0440\u043e\u0441\u044b. Paypal \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <a href=\"https:\/\/github.com\/paypal\/ipn-code-samples\">\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 IPN listener<\/a>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/developer.paypal.com\/docs\/classic\/ipn\/integration-guide\/IPNIntro\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0412 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: Paypal \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0438\u0434\u0438\u0442 \u0447\u0442\u043e \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u043f\u043b\u0430\u0442\u0435\u0436 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e IPN \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0430\u0448 Notification URL \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430 Post \u0437\u0430\u043f\u0440\u043e\u0441:  <\/p>\n<pre><code>mc_gross=37.50&protection_eligibility=Ineligible&payer_id=J86MHHMUDEHZU&tax=0.00&payment_date=07%3A04%3A48+Mar+30%2C+2015+PDT&payment_status=Completed&charset=windows-1252&first_name=test&mc_fee=1.39&notify_version=3.8&custom=%7B%22user_id%22%3A314%2C%22service_provider%22%3A%22twilio%22%2C%22service_name%22%3A%22textMessages%22%7D&payer_status=verified&business=antonshel-facilitator%40gmail.com&quantity=150&verify_sign=AR-ITpb83c-ktcbmApqG4jM17OeQAx2RSvfYZo4XU8YFZrTSeF.iYsSx&payer_email=antonshel-buyer%40gmail.com&txn_id=30R69966SH780054J&payment_type=instant&last_name=buyer&receiver_email=antonshel-facilitator%40gmail.com&payment_fee=1.39&receiver_id=VM2QHCE6FBR3N&txn_type=web_accept&item_name=GetScorecard+Text+Messages&mc_currency=USD&item_number=&residence_country=US&test_ipn=1&handling_amount=0.00&transaction_subject=%7B%22user_id%22%3A314%2C%22service_provider%22%3A%22twilio%22%2C%22service_name%22%3A%22textMessages%22%7D&payment_gross=37.50&shipping=0.00&ipn_track_id=6b01a2c76197 <\/code><\/pre>\n<p>  \u041d\u0430\u0448 IPN Listener \u0434\u043e\u043b\u0436\u0435\u043d \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0438\u043f \u0437\u0430\u043f\u0440\u043e\u0441\u0430(\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436 \u043b\u0438\u0431\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430). \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436 \u2014 web_accept.<\/li>\n<li>\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2014 sandbox \u043b\u0438\u0431\u043e live.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0417\u043d\u0430\u044f \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 IPN \u0437\u0430\u043f\u0440\u043e\u0441 \u0438, \u0437\u043d\u0430\u044f \u043d\u0430\u0448 IPN Notification URL, \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u043c \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php \/**  * Class PaypalIpn  *\/ class PaypalIpn{      private $debug = true;     private $service;      \/**      * @throws Exception      *\/     public function createIpnListener(){         $postData = file_get_contents('php:\/\/input');         $transactionType = $this-&gt;getPaymentType($postData);          $config = Config::get();  \t\t\/\/ \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043b\u0430\u0441         if($transactionType == PaypalTransactionType::TRANSACTION_TYPE_SINGLE_PAY){             $this-&gt;service = new PaypalSinglePayment();         }         elseif($transactionType == PaypalTransactionType::TRANSACTION_TYPE_SUBSCRIPTION){             $this-&gt;service = new PaypalSubscription($config);         }         else{             throw new Exception('Wrong payment type');         }          $raw_post_data = file_get_contents('php:\/\/input');          $raw_post_array = explode('&', $raw_post_data);         $myPost = array();         foreach ($raw_post_array as $keyval) {             $keyval = explode ('=', $keyval);             if (count($keyval) == 2)                 $myPost[$keyval[0]] = urldecode($keyval[1]);         }          $customData = $customData = json_decode($myPost['custom'],true);         $userId = $customData['user_id'];          \/\/ read the post from PayPal system and add 'cmd'         $req = 'cmd=_notify-validate';         if(function_exists('get_magic_quotes_gpc')) {             $get_magic_quotes_exists = true;         }         else{             $get_magic_quotes_exists = false;         }           foreach ($myPost as $key =&gt; $value) {             if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {                 $value = urlencode(stripslashes($value));             } else {                 $value = urlencode($value);             }             $req .= &quot;&$key=$value&quot;;         }          $myPost['customData'] = $customData;          $paypal_url = 'https:\/\/www.sandbox.paypal.com\/cgi-bin\/websc';         \/\/$paypal_url = 'https:\/\/www.paypal.com\/cgi-bin\/websc';  \t\t\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 IPN \u0437\u0430\u043f\u0440\u043e\u0441\u0430         $res = $this-&gt;sendRequest($paypal_url,$req);          \/\/ Inspect IPN validation result and act accordingly         \/\/ Split response headers and payload, a better way for strcmp         $tokens = explode(&quot;\\r\\n\\r\\n&quot;, trim($res));         $res = trim(end($tokens));          \/**\/         if (strcmp ($res, &quot;VERIFIED&quot;) == 0) { \t\t\t\/\/ \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u044e\u043e\u0442\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430             $this-&gt;service-&gt;processPayment($myPost);         } else if (strcmp ($res, &quot;INVALID&quot;) == 0) {             \/\/ \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u043f\u0440\u043e\u0449\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443             self::log([                 'message' =&gt; &quot;Invalid IPN: $req&quot; . PHP_EOL,                 'level' =&gt; self::LOG_LEVEL_ERROR             ], $myPost);         }         \/**\/     }      private function sendRequest($paypal_url,$req){         $debug = $this-&gt;debug;          $ch = curl_init($paypal_url);         if ($ch == FALSE) {             return FALSE;         }         curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);         curl_setopt($ch, CURLOPT_POST, 1);         curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);         curl_setopt($ch, CURLOPT_POSTFIELDS, $req);          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);          curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);         curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);         if($debug == true) {             curl_setopt($ch, CURLOPT_HEADER, 1);             curl_setopt($ch, CURLINFO_HEADER_OUT, 1);         }          curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);  \t\t\/\/\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c User-Agent - \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 live \u0440\u0435\u0436\u0438\u043c\u0435         curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close', 'User-Agent: ' . $this-&gt;projectName));          $res = curl_exec($ch);         curl_close($ch);          return $res;     } \t \tpublic function getPaymentType($rawPostData){         $post = $this-&gt;getPostFromRawData($rawPostData); \t\t         if(isset($post['subscr_id'])){             return &quot;subscr_payment&quot;;         }         else{             return &quot;web_accept&quot;;         }     }      \/**      * @param $raw_post_data      * @return array      *\/     public function getPostFromRawData($raw_post_data){         $raw_post_array = explode('&', $raw_post_data);         $myPost = array();         foreach ($raw_post_array as $keyval) {             $keyval = explode ('=', $keyval);             if(count($keyval) == 2)                 $myPost[$keyval[0]] = urldecode($keyval[1]);         }          return $myPost;     } }    ?&gt; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 Paypal \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/h2>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f custom, \u0433\u0434\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 id \u0437\u0430\u043a\u0430\u0437\u0430, id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e(\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\/\u0437\u0430\u043a\u0430\u0437\u0435. \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c id \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. <\/p>\n<p>  Paypal \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438, \u0435\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0435\u0435. \u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u0442\u043e\u0433\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c.<\/p>\n<p>  \u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435 \u0432 \u0431\u0430\u0437\u0443 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u0442\u0430\u0442\u0443\u0441 \u00abpremium\u00bb, \u0437\u0430\u043a\u0430\u0437\u0443 \u0441\u0442\u0430\u0442\u0443\u0441 \u00ab\u043e\u043f\u043b\u0430\u0447\u0435\u043d\u00bb \u0438 \u0442.\u0434.). \u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u0442\u0435\u0436 \u043d\u0435 \u043f\u0440\u043e\u0448\u0435\u043b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0438 \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<pre><code class=\"php\">&lt;?php \tfunction processPayment($myPost){          $customData = json_decode($myPost['custom'],true);         $userId = $customData['user_id']; \t\t$productId = $customData['product_id'];  \t\t\/\/         $userService = new UserService();         $userInfo = $userService-&gt;getUserData($userId);  \t\t\/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445         $transactionService = new TransactionService();         $transaction = $transactionService-&gt;getTransactionById($myPost['txn_id']);          if($transaction === null){ \t\t\t\/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u0438\u0437 \u0431\u0434 \t\t\t$productService = new ProductService();             $product = $productService-&gt;getProductById($productId);  \t\t\t\/\/ \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438             if($this-&gt;validateTransaction($myPost,$product)){ \t\t\t\t\/\/ \u043e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.                  $transactionService-&gt;createTransaction($myPost); \t\t\t\t \t\t\t\t\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f             } \t\t\telse{ \t\t\t\t\/\/ \u043f\u043b\u0430\u0442\u0435\u0436 \u043d\u0435 \u043f\u0440\u043e\u0448\u0435\u043b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \t\t\t}         }         else{ \t\t\t\/\/\u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442, \u044d\u0442\u0443 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u043c\u044b \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438. \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c         }     } ?&gt;\t <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/h2>\n<p>  \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u043f\u043b\u0430\u0442\u0438\u043b 15 \u0435\u0434\u0438\u043d\u0438\u0446 \u0442\u043e\u0432\u0430\u0440\u0430, \u0430 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e 10. \u041d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043a\u0430\u0437.<\/p>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0449\u0438 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0449\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u043e\u0440\u043c\u044b. \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0432\u0430\u0440\u0430, \u0430 \u0446\u0435\u043d\u0443 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043f\u0440\u0435\u0436\u043d\u0435\u0439).<\/p>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0446\u0435\u043d\u044b \u0432 \u043f\u043b\u0430\u0442\u0435\u0436\u0435 \u0438 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 0(\u043f\u0430\u0440\u0430\u043d\u043e\u0439\u044f \u0442.\u043a. \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439)<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0430\u043b\u044e\u0442\u0443 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php     function validateTransaction($myPost,$product){         $valid = true;  \t\t\/* \t\t * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0446\u0435\u043d \t\t *\/         if($product-&gt;getTotalPrice($myPost['quantity']) != $myPost['payment_gross']){             $valid = false;         } \t\t\/* \t\t * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u0446\u0435\u043d\u0443 \t\t *\/         elseif($myPost['payment_gross'] == 0){             $valid = false;         } \t\t\/* \t\t * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \t\t *\/         elseif($myPost['payment_status'] !== 'Completed'){             $valid = false;         } \t\t\/* \t\t * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \t\t *\/         elseif($myPost['receiver_email'] != 'YOUR PAYPAL ACCOUNT'){             $valid = false;         } \t\t\/* \t\t * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0430\u043b\u044e\u0442\u044b \t\t *\/         elseif($myPost['mc_currency'] != 'USD'){             $valid = false;         }          return $valid;     } ?&gt;\t <\/code><\/pre>\n<p>  \u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0438. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u044b \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0433\u0438\u0431\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0446\u0435\u043d\u043e\u0439 \u0442\u043e\u0432\u0430\u0440\u0430(2 \u043f\u043e \u0446\u0435\u043d\u0435 3, \u043a\u0430\u0436\u0434\u043e\u043c\u0443 101 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044e \u0441\u043a\u0438\u0434\u043a\u0430 30% \u0438 \u0442.\u0434.). \u041d\u0430\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0432 Paypal.<\/p>\n<h2>\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0442\u043e\u0442 \u0436\u0435, \u0447\u0442\u043e \u0438 \u0441 \u0440\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435.<\/p>\n<p>  \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0445 \u043f\u043b\u0430\u043d\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Free \u2014 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, Pro \u2014 5$ \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043c\u0435\u0441\u044f\u0446, Premium \u2014 10$ \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043c\u0435\u0441\u044f\u0446. <br \/>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c \u0434\u0435\u043d\u0435\u0433 \u0437\u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d, \u043b\u0438\u0431\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f Free \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 paypal \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e\u0442 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0445\u043e\u0440\u043e\u0448\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c SaaS \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0418 \u0441 \u0445\u043e\u0434\u0443 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Paypal.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<p>  subscription_plans \u2014 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0445 \u043f\u043b\u0430\u043d\u043e\u0432:<\/p>\n<table>\n<tr>\n<td>id<\/td>\n<td>service_provider<\/td>\n<td>service_name<\/td>\n<td>price<\/td>\n<td>price_type<\/td>\n<td>period<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Service<\/td>\n<td>pro<\/td>\n<td>5.00<\/td>\n<td>user<\/td>\n<td>month<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Service<\/td>\n<td>enterprise<\/td>\n<td>10.00<\/td>\n<td>user<\/td>\n<td>month<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Service<\/td>\n<td>free<\/td>\n<td>0.00<\/td>\n<td>user<\/td>\n<td>month<\/td>\n<\/tr>\n<\/table>\n<p>  subscriptions \u2014 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a:<\/p>\n<table>\n<tr>\n<td>id<\/td>\n<td>user_id<\/td>\n<td>plan_id<\/td>\n<td>subscription_id<\/td>\n<td>created_date<\/td>\n<td>updated_date<\/td>\n<td>payment_date<\/td>\n<td>items_count<\/td>\n<td>status<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h2>\u0424\u043e\u0440\u043c\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/h2>\n<p>  \u0424\u043e\u0440\u043c\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php $payNowButtonUrl = 'https:\/\/www.sandbox.paypal.com\/cgi-bin\/websc'; $userId = 1 \/\/ id \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  $receiverEmail = 'xxx-facilitator@gmail.com'; \/\/email \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430(\u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u0440\u0435\u0433\u0435\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d paypal \u0430\u043a\u043a\u0430\u0443\u043d\u0442)   $serviceId = 1; $serviceName = 'Service Pro';\t\/\/ \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438(\u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d) $servicePrice = '5.00'; \/\/ \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 - 5$ \u0437\u0430 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0437\u0430 \u043c\u0435\u0441\u044f\u0446 $quantity = 3;\t\/\/ \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439  $amount = $servicePrice * $quantity;\t\/\/ \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 - 15$ \u0432 \u043c\u0435\u0441\u044f\u0446  $returnUrl = 'http:\/\/your-site.com\/subscription?status=paymentSuccess'; $customData = ['user_id' =&gt; $userId, 'service_id' =&gt; $serviceId ]; ?&gt;  &lt;form id=&quot;createSubscription&quot; action=&quot;&lt;?php echo $payNowButtonUrl; ?&gt;&quot; method=&quot;post&quot; target=&quot;_top&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_xclick-subscriptions&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;&lt;?php echo $receiverEmail; ?&gt;&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;lc&quot; value=&quot;GB&quot;&gt;      &lt;input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;&lt;?php echo $serviceName; ?&gt;&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;1&quot;&gt; \t \t&lt;input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;&lt;?php echo $returnUrl; ?&gt;&quot;&gt;      &lt;input type=&quot;hidden&quot; name=&quot;src&quot; value=&quot;1&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;a3&quot; value=&quot;&lt;?php echo $amount; ?&gt;&quot;&gt;      \t&lt;input type=&quot;hidden&quot; name=&quot;p3&quot; value=&quot;1&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;t3&quot; value=&quot;M&quot;&gt;      &lt;input id=&quot;customData&quot; type=&quot;hidden&quot; name=&quot;custom&quot; value=&quot;&lt;?php echo json_encode($customData); ?&gt;&quot;&gt;     &lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;&gt;      &lt;button type=&quot;submit&quot;&gt;Subscribe&lt;\/button&gt; &lt;\/form&gt; <\/code><\/pre>\n<p>  \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c a3. \u041f\u0435\u0440\u0438\u043e\u0434 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 p3 \u0438 t3(\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0441\u044f\u0446).<\/p>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/developer.paypal.com\/docs\/classic\/paypal-payments-standard\/integration-guide\/Appx_websitestandard_htmlvariables\/#id08A6HI00JQU\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>IPN<\/h2>\n<p>  \u0421 IPN \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0441 \u0440\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438. \u041f\u0440\u0430\u0432\u0434\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0442.\u043a. \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043f\u043b\u0430\u0442\u0435\u0436 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435, \u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442.\u0434. \u041a\u0430\u043a \u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<h2>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/h2>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0441 \u0440\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u0442\u0435\u0436, \u043d\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043e\u0442\u043c\u0435\u043d\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u043e\u0433\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0442\u0430\u0440\u0438\u0444\u043d\u043e\u043c \u043f\u043b\u0430\u043d\u0435 Pro \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 100 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0418\u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u044d\u0442\u043e\u043c \u0440\u043e\u0434\u0435. \u041e\u043f\u044f\u0442\u044c \u0436\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0443\u0447\u0435\u0441\u0442\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>  \u0427\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435:<\/p>\n<ul>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442<\/li>\n<li>\u0414\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e<br \/> \n<ul>\n<li>\u0446\u0435\u043d\u0430 \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 0<\/li>\n<li>\u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0440\u0430\u0432\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/li>\n<li>\u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/li>\n<li>\u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u00abCompleted\u00bb<\/li>\n<li>\u0432\u0430\u043b\u044e\u0442\u0430 USD<\/li>\n<\/ul>\n<p>  <\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043b\u0430\u0442\u0435\u0436 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0441\u0443\u043c\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0443\u043c\u043c\u044b \u043f\u043b\u0430\u0442\u0435\u0436\u0430(\u0441\u0443\u043c\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0442)<\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0446\u0435\u043d\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php  \tfunction validateSubscription($subscriptionPlan,$myPost){         $userId = $myPost['customData']['user_id'];         $userService = new UserService();         $userInfo = $userService-&gt;getUserData($userId);          $customData = $this-&gt;getCustomData($myPost);  \t\t\/\/\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438         if($myPost['txn_type'] == 'subscr_cancel'){             $subscriptionService = new SubscriptionService();             $subscription = $subscriptionService-&gt;loadBySubscriptionId($myPost['subscr_id']);              if(!$subscription-&gt;id){ \t\t\t\t\/\/\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442                  return false;             }         } \t\t\/\/\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430         elseif($myPost['txn_type'] == 'subscr_payment'){             \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0446\u0435\u043d\u044b \t\t\tif($subscriptionPlan-&gt;price * $myPost['customData']['items_count'] != $myPost['mc_gross']){ \t\t\t                 return false;             }              \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0446\u0435\u043d\u0430 \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 0 \t\t\tif($myPost['mc_gross'] == 0){                  return false;             }  \t\t\t\/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430             if($myPost['receiver_email'] != 'xxx-facilitator@yandex.ru'){                  return false;             }  \t\t\t\/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0430\u043b\u044e\u0442\u0443             if($myPost['mc_currency'] != 'USD'){                  return false;             }  \t\t\t\/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430             if($myPost['payment_status'] != 'Completed'){                  return false;             }         } \t\t\/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0430         elseif($myPost['reason_code'] == 'refund' && $myPost['payment_status'] == 'Refunded'){ \t\t\t$transactionService = new TransactionService();             $lastTransaction = $transactionService-&gt;getLastActiveTransactionBySubscription($myPost['subscr_id']);  \t\t\t\/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u043b\u0430\u0442\u0435\u0436 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442             if(!$lastTransaction){                  return false;             }  \t\t\t\/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0443\u043c\u043c\u044b \u043f\u043b\u0430\u0442\u0435\u0436\u0430             if(abs($myPost['mc_gross']) &gt; $lastTransaction['mc_gross']){                  return false;             }         }          return true;     } ?&gt; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u0417\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438:  <\/p>\n<ul>\n<li>\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442<\/li>\n<li>\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430<\/li>\n<li>\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430<\/li>\n<\/ul>\n<p>  \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<pre><code class=\"php\">&lt;?php \tfunction processPayment($myPost){         $customData = $this-&gt;getCustomData($myPost);         $userId = $customData['user_id'];          $userService = new UserService();         $userInfo = $userService-&gt;getUserData($userId);  \t\t$subscriptionPlanService = new SubscriptionPlanService();         $subscriptionPlan = $subscriptionPlanService-&gt;getSubscriptionPlan($myPost); \t\t \t\t$transactionService = new TransactionService(); \t\t$subscriptionService = new SubscriptionService();          if(validateSubscription($subscriptionPlan,$myPost)){                          $subscription = $subscriptionService-&gt;loadBySubscriptionId($myPost['subscr_id']);              $transaction = $transactionService-&gt;getTransactionById($myPost['txn_id']);  \t\t\t\/\/\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442             if($subscription-&gt;id){                  \t\t\t\t\/\/ \u043f\u043b\u0430\u0442\u0435\u0436 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435                 if($myPost['txn_type'] == 'subscr_payment'){  \t\t\t\t\t\/\/ \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0435\u0449\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430\u0441\u044c                     if(!$transaction){ \t\t\t\t\t \t\t\t\t\t\t\/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443                         $subscription-&gt;status = 'active';                         $subscription-&gt;payment_date = $myPost['payment_date'];                         $subscription-&gt;updated_date = date('Y-m-d H:i:s');                         $subscription-&gt;save();  \t\t\t\t\t\t\/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \t\t\t\t\t\t$myPost['relation_id'] = $subscription-&gt;id;                         $myPost['relation_type'] = 'transaction';                         $transactionService-&gt;createTransaction($myPost);                     }                     else{                         \/\/\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430\u0441\u044c. \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c                     }                 }  \t\t\t\t\/\/ \u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438                 if($myPost['txn_type'] == 'subscr_cancel'){                     $subscription-&gt;status = 'cancelled';                     $subscription-&gt;updated_date = date('Y-m-d H:i:s');                     $subscription-&gt;save();                 }  \t\t\t\t\/\/ \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438\u0441\u0442\u0435\u043a\u043b\u0430                 if($myPost['txn_type'] == 'subscr_eot'){                     $subscription-&gt;status = 'expired';                     $subscription-&gt;updated_date = date('Y-m-d H:i:s');                     $subscription-&gt;save();                 }  \t\t\t\t\/\/ \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442                 if($myPost['txn_type'] == 'subscr_signup'){                                      }  \t\t\t\t\/\/ \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0432 \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443. \u041d\u0443\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c                 if($myPost['txn_type'] == 'subscr_modify'){                     $subscription-&gt;status = 'modified';                     $subscription-&gt;updated_date = date('Y-m-d H:i:s');                     $subscription-&gt;save();                 }  \t\t\t\t\/\/ \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0430                 if($myPost['payment_status'] == 'Refunded' && $myPost['reason_code'] == 'refund'){                      \t\t\t\t\t\/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435                     $transactionService-&gt;updateTransactionStatus($myPost['parent_txn_id'],'Refunded');  \t\t\t\t\t\/\/\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e (\u0432\u043e\u0437\u0432\u0440\u0430\u0442)                     $myPost['txn_type'] = 'refund';                     $myPost['relation_id'] = $subscription-&gt;id;                     $myPost['relation_type'] = 'subscription';                     $transactionService-&gt;createTransaction($myPost);                 }             } \t\t\t\/\/ \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442             else{ \t\t\t \t\t\t\t\/\/ \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435                 if($myPost['txn_type'] == 'subscr_payment'){                                           $activeSubscriptions = $subscriptionService-&gt;getActiveSubscriptions($userId);                      \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438.                     if(count($activeSubscriptions) &gt; 0){                         \/\/ \u043e\u0448\u0438\u0431\u043a\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438                     }                     elseif(!$transaction){ \t\t\t\t\t\t\/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443                         $subscription = new Subscription();                         $subscription-&gt;user_id = $userId;                         $subscription-&gt;plan_id = $subscriptionPlan-&gt;id;                         $subscription-&gt;subscription_id = $myPost['subscr_id'];                         $subscription-&gt;created_date = date(&quot;Y-m-d H:i:s&quot;);                         $subscription-&gt;updated_date = date('Y-m-d H:i:s');                         $subscription-&gt;payment_date = $myPost['payment_date'];                         $subscription-&gt;items_count = $customData['items_count'];                         $subscription-&gt;status = 'active';                         $subscriptionId = $subscription-&gt;save();  \t\t\t\t\t\t\/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e                         $myPost['relation_id'] = $subscriptionId;                         $myPost['relation_type'] = PaypalTransaction::TRANSACTION_RELATION_SUBSCRIPTION;                          $transactionService = new PaypalTransaction();                         $transactionService-&gt;createTransaction($myPost);                     }                     else{                         \/\/ \u043f\u043b\u0430\u0442\u0435\u0436 \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d                     }                 }  \t\t\t\t\/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0437\u0434\u0435\u0441\u044c, \u043d\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0435 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430                 if($myPost['txn_type'] == 'subscr_signup'){                                      }  \t\t\t\t\/\/ \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u0422\u0430\u043a\u043e\u0433\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0442.\u043a. \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442                 if($myPost['txn_type'] == 'subscr_modify'){                                      }             }         }         else{             \/\/ \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e         }     } ?&gt; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041e\u0442\u043c\u0435\u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/h2>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0442\u043c\u0435\u043d\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0434\u043e\u0435\u0441\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f Paypal Classic Api \u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f Username, Password \u0438 Signature. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ca8\/207\/e39\/ca8207e39b884b84a1e20ec7e759cb4c.jpg\"\/><\/p>\n<p>  \u041e\u0442\u043c\u0435\u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/developer.paypal.com\/docs\/classic\/api\/merchant\/ManageRecurringPaymentsProfileStatus_API_Operation_NVP\/\">ManageRecurringPaymentsProfileStatus<\/a> <\/p>\n<pre><code class=\"php\">&lt;?php \/\/ $profile_id - id \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 $myPost['subscr_id']) \/\/ $action - 'Cancel'  public function changeSubscriptionStatus($profile_id, $action, $apiCredentials){     $api_request = 'USER=' . urlencode( $apiCredentials['username'] )         .  '&PWD=' . urlencode( $apiCredentials['password'] )         .  '&SIGNATURE=' . urlencode( $apiCredentials['signature'] )         .  '&VERSION=76.0'         .  '&METHOD=ManageRecurringPaymentsProfileStatus'         .  '&PROFILEID=' . urlencode( $profile_id )         .  '&ACTION=' . urlencode( $action )         .  '&NOTE=' . urlencode( 'Profile cancelled at store' );      $ch = curl_init();  \tcurl_setopt( $ch, CURLOPT_URL, 'https:\/\/api-3t.sandbox.paypal.com\/nvp' ); \/\/ For live transactions, change to 'https:\/\/api-3t.paypal.com\/nvp'      curl_setopt( $ch, CURLOPT_VERBOSE, 1 );  \tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);      curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );     curl_setopt( $ch, CURLOPT_POST, 1 );      \/\/ Set the API parameters for this transaction     curl_setopt( $ch, CURLOPT_POSTFIELDS, $api_request );      \/\/ Request response from PayPal     $response = curl_exec( $ch );      \/\/ If no response was received from PayPal there is no point parsing the response     if( ! $response ){         return false;     }      curl_close( $ch );      \/\/ An associative array is more usable than a parameter string     parse_str( $response, $parsed_response );      return $parsed_response; } ?&gt; <\/code><\/pre>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u044d\u0442\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c, \u0442.\u043a. \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0443\u0436\u0435 \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430. \u041d\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043c\u044b \u0442\u043e\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c. \u041f\u043e\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0432\u0441\u0435\u043b\u043f\u0443\u044e (\u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0434\u0432\u0430\u0436\u0434\u044b). \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 <a href=\"http:\/\/thereforei.am\/2012\/07\/03\/cancelling-subscriptions-created-with-paypal-standard-via-the-express-checkout-api\/\">\u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435<\/a>. <\/p>\n<h2>\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432(\u043f\u043e\u043b\u043d\u044b\u0439\/\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439)<\/h2>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0440\u043e\u043c\u0435 \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0437\u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434(\u043f\u0440\u0438\u043c: \u043e\u0444\u043e\u0440\u043c\u0438\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 \u043c\u0435\u0441\u044f\u0446, \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0434\u0435\u043b\u044e \u043e\u0442\u043c\u0435\u043d\u0438\u043b \u2014 \u043d\u0443\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c 75% \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438).<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Paypal Classic Api, \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/developer.paypal.com\/docs\/classic\/api\/merchant\/RefundTransaction_API_Operation_NVP\/\">RefundTransaction<\/a>.<\/p>\n<pre><code class=\"php\">&lt;?php\t \t\/\/ $transaction_id - $myPost['txn_id'] \t\/\/ $amount - \u0441\u0443\u043c\u043c\u0430 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \t     public function refundTransaction($transaction_id,$apiCredentials$amount = null){          $transaction_id = $transaction['txn_id'];          $refundType = 'Full';          if($amount){             $amount = round($amount, 2, PHP_ROUND_HALF_DOWN);             $amount = str_replace(',','.',$amount);             $refundType = 'Partial';         }          $api_request = 'USER=' . urlencode( $apiCredentials['username'] )             .  '&PWD=' . urlencode( $apiCredentials['password'] )             .  '&SIGNATURE=' . urlencode( $apiCredentials['signature'] )             .  '&VERSION=119'             .  '&METHOD=RefundTransaction'             .  '&TRANSACTIONID=' . urlencode( $transaction_id )             .  '&REFUNDTYPE=' . urlencode( $refundType )             .  '&CURRENCYCODE=' . urlencode( 'USD' );          if($amount){             $api_request .= '&AMT=' . urlencode( $amount );         }           $ch = curl_init();  \t\tcurl_setopt( $ch, CURLOPT_URL, 'https:\/\/api-3t.sandbox.paypal.com\/nvp' ); \/\/ For live transactions, change to 'https:\/\/api-3t.paypal.com\/nvp'          curl_setopt( $ch, CURLOPT_VERBOSE, 1 );          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);          curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );         curl_setopt( $ch, CURLOPT_POST, 1 );          \/\/ Set the API parameters for this transaction         curl_setopt( $ch, CURLOPT_POSTFIELDS, $api_request );          \/\/ Request response from PayPal         $response = curl_exec( $ch );          \/\/ If no response was received from PayPal there is no point parsing the response         if( ! $response ){             return false;         }          curl_close( $ch );          \/\/ An associative array is more usable than a parameter string         parse_str( $response, $parsed_response );          return $parsed_response;     } ?&gt; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0443\u043c\u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434. \u041a\u043e\u0434 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. <\/p>\n<pre><code class=\"php\">&lt;?php public static function getTransactionRefundAmount($transaction){     $paymentDate = date('Y-m-d',strtotime($transaction['payment_date']));     $currentDate = date('Y-m-d');      $paymentDate = new DateTime($paymentDate);     $currentDate = new DateTime($currentDate);      $dDiff = $paymentDate-&gt;diff($currentDate);     $days =  $dDiff-&gt;days;     $daysInMonth = cal_days_in_month(CAL_GREGORIAN,$currentDate-&gt;format('m'),$currentDate-&gt;format('Y'));      $amount = $transaction['mc_gross'] - $transaction['mc_gross'] * $days \/ $daysInMonth;     $amount = round($amount, 2, PHP_ROUND_HALF_DOWN);     $amount = str_replace(',','.',$amount);      return $amount; } ?&gt; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u042d\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d, \u0438\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, paypal \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438.<\/p>\n<p>  \u042d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f <a href=\"http:\/\/stackoverflow.com\/questions\/7640723\/changing-the-amount-of-a-paypal-subscription\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>  \u041d\u0430 \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d, \u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432. \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043d\u0430\u0440\u0435\u043a\u0430\u043d\u0438\u0439. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435. \u0445\u043e\u0442\u044f, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432\u044b\u0448\u0435 \u0435\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438 Paypal. \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0435 \u043f\u043b\u0430\u043d\u044b \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 (\u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0438 \u0442.\u0434.). <\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435. \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.             <\/p>\n<div class=\"clear\"><\/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=\"http:\/\/habrahabr.ru\/post\/266091\/\"> http:\/\/habrahabr.ru\/post\/266091\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Paypal \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0430 PHP, \u043d\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0431\u0440\u0430\u043d \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c\u044e. \u042d\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0435 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 Paypal \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0417\u043d\u0430\u0442\u043e\u043a\u0438 Paypal \u0432\u0440\u044f\u0434 \u043b\u0438 \u043d\u0430\u0439\u0434\u0443\u0442 \u0437\u0434\u0435\u0441\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435. \u041d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d\u0438 \u0443\u043a\u0430\u0436\u0443\u0442 \u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043b\u0438 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u0443\u044e\u0442, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.  <\/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-264926","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/264926","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=264926"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/264926\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=264926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=264926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=264926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}