{"id":26566,"date":"2021-04-25T11:15:00","date_gmt":"2021-04-25T08:15:00","guid":{"rendered":"https:\/\/themewp.inform.click\/?p=26566"},"modified":"2025-02-12T05:49:09","modified_gmt":"2025-02-12T02:49:09","slug":"posibnik-z-integracii-paypal-na-vashomu-veb-sajti-v-php","status":"publish","type":"post","link":"https:\/\/themewp.inform.click\/uk\/posibnik-z-integracii-paypal-na-vashomu-veb-sajti-v-php\/","title":{"rendered":"\u041f\u043e\u0441\u0456\u0431\u043d\u0438\u043a \u0437 \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal \u043d\u0430 \u0432\u0430\u0448\u043e\u043c\u0443 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456 \u0432 PHP"},"content":{"rendered":"<p>PayPal, \u0431\u0435\u0437 \u0441\u0443\u043c\u043d\u0456\u0432\u0443, \u0454 \u043e\u0434\u043d\u0438\u043c \u0437 \u043d\u0430\u0439\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0456\u0448\u0438\u0445 \u043f\u043b\u0430\u0442\u0456\u0436\u043d\u0438\u0445 \u0448\u043b\u044e\u0437\u0456\u0432 \u0434\u043b\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456\u0432. \u0411\u0456\u043b\u044c\u0448\u0456\u0441\u0442\u044c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456\u0432 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0442\u044c PayPal \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0456\u0432 \u0437\u0430 \u0457\u0445 \u0437\u0430\u044f\u0432\u043a\u043e\u044e. \u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u043c\u0438 \u0432\u0438\u0432\u0447\u0430\u0454\u043c\u043e \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u044e PayPal \u0443 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443 \u043d\u0430 PHP.<\/p>\n<h3>\u0427\u043e\u043c\u0443 \u043e\u0431\u0438\u0440\u0430\u0442\u0438 PayPal?<\/h3>\n<p>\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f <a href=\"https:\/\/www.paypal.com\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043e\u0431\u043b\u0456\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443 \u043d\u0430 PayPal<\/a> \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0437\u043a\u043e\u0448\u0442\u043e\u0432\u043d\u0435. \u0412\u0430\u043c \u043d\u0435 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043d\u0456\u0447\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u0438 \u0437\u0430\u0437\u0434\u0430\u043b\u0435\u0433\u0456\u0434\u044c. PayPal \u0441\u0442\u044f\u0433\u0443\u0432\u0430\u0442\u0438\u043c\u0435 \u043f\u043b\u0430\u0442\u0443 \u0437 \u0432\u0430\u0441 \u0437\u0430 \u043a\u043e\u0436\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u044e.<\/p>\n<p>\u041f\u0456\u0434 \u0447\u0430\u0441 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u043f\u043b\u0430\u0442\u0456\u0436\u043d\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u0439 PayPal \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0448\u0438\u0444\u0440\u0443\u0432\u0430\u043d\u043d\u044f Secure Socket Layers (SSL). \u0426\u0435 \u0437\u0430\u0445\u0438\u0449\u0430\u0454 \u043e\u0441\u043e\u0431\u0438\u0441\u0442\u0456 \u0442\u0430 \u043a\u043e\u043d\u0444\u0456\u0434\u0435\u043d\u0446\u0456\u0439\u043d\u0456 \u0434\u0430\u043d\u0456 \u0432\u0430\u0448\u043e\u0433\u043e \u043a\u043b\u0456\u0454\u043d\u0442\u0430. \u0427\u0435\u0440\u0435\u0437 \u0446\u0435 \u0432\u0430\u0448\u0456 \u043a\u043b\u0456\u0454\u043d\u0442\u0438 \u043f\u043e\u0447\u0443\u0432\u0430\u044e\u0442\u044c\u0441\u044f \u0432 \u0431\u0435\u0437\u043f\u0435\u0446\u0456, \u0437\u0434\u0456\u0439\u0441\u043d\u044e\u044e\u0447\u0438 \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0434\u043e\u0434\u0430\u0442\u043e\u043a.<\/p>\n<p>PayPal \u0442\u0430\u043a\u043e\u0436 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0437\u0434\u0456\u0439\u0441\u043d\u044e\u0432\u0430\u0442\u0438 \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u0431\u0430\u043b\u0430\u043d\u0441 PayPal, \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u0456 \u0430\u0431\u043e \u0434\u0435\u0431\u0435\u0442\u043e\u0432\u0456 \u043a\u0430\u0440\u0442\u043a\u0438. \u0426\u0435 \u0434\u043e\u0434\u0430\u0454 \u0440\u044f\u0434 \u043e\u043f\u0446\u0456\u0439, \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u044f\u043a\u0438\u0445 \u043a\u043b\u0456\u0454\u043d\u0442 \u043c\u043e\u0436\u0435 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u0438 \u0432\u0430\u0448\u0443 \u043f\u043e\u0441\u043b\u0443\u0433\u0443.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u0439\u043e\u043c\u0443 \u043e\u043f\u043b\u0430\u0442\u0438 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u0438\u0445 \u043a\u0430\u0440\u0442\u043e\u043a \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442\u0438\u0441\u044f \u043f\u043e\u0441\u043b\u0443\u0433\u043e\u044e <a href=\"http:\/\/reseller.authorize.net\/application\/103001\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">Authorize.net<\/a>. \u042f\u043a\u0449\u043e \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u0434\u0456\u0437\u043d\u0430\u0442\u0438\u0441\u044c \u0431\u0456\u043b\u044c\u0448\u0435 \u043f\u0440\u043e Authorize.net, \u0434\u043e\u0442\u0440\u0438\u043c\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430\u0448\u043e\u0433\u043e \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0430 <a href=\"https:\/\/themewp.inform.click\/uk\/pryjmit-oplatu-kredytnoiu-kartkoiu-za-dopomohoiu-authorize-net-payment-gateway-u-php\/\" title=\"\u041f\u0440\u0438\u0439\u043c\u0456\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u043e\u044e \u043a\u0430\u0440\u0442\u043a\u043e\u044e, \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 Authorize.net Payment Gateway \u0443 PHP\">\u041f\u0440\u0438\u0439\u043c\u0456\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u043e\u044e \u043a\u0430\u0440\u0442\u043a\u043e\u044e, \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 Authorize.net Payment Gateway \u0443 PHP<\/a>.<\/p>\n<h3>\u0406\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u044f PayPal<\/h3>\n<p>\u041e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u043c\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043c\u043e \u043f\u0440\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442, \u0449\u043e \u043f\u0440\u0430\u0446\u044e\u0454 \u043d\u0430 PHP, \u043c\u0438 \u0431\u0443\u0434\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 <a href=\"https:\/\/github.com\/paypal\/PayPal-PHP-SDK\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043e\u0444\u0456\u0446\u0456\u0439\u043d\u0443 \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0443 GiHub PayPal<\/a>. \u0426\u044f \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c \u043d\u0430 PHP.<\/p>\n<p>\u041c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 <a href=\"https:\/\/getcomposer.org\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">Composer<\/a> \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>\u041e\u0442\u0436\u0435, \u0434\u043b\u044f \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal \u0443 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0443 \u043d\u0438\u0436\u0447\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u043a\u043e\u0440\u0435\u043d\u0435\u0432\u043e\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0437\u0456 \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/p>\n<pre><code>composer require \"paypal\/rest-api-sdk-php:*\"<\/code><\/pre>\n<h3>\u041e\u0442\u0440\u0438\u043c\u0430\u0439\u0442\u0435 \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043a\u043b\u0456\u0454\u043d\u0442\u0430 \u0442\u0430 \u0441\u0435\u043a\u0440\u0435\u0442 \u043a\u043b\u0456\u0454\u043d\u0442\u0430<\/h3>\n<p>\u041a\u043e\u043b\u0438 \u043a\u043b\u0456\u0454\u043d\u0442 \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 PayPal, \u0441\u0443\u043c\u0430 \u043f\u043e\u0432\u0438\u043d\u043d\u0430 \u0431\u0443\u0442\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448 \u0440\u0430\u0445\u0443\u043d\u043e\u043a PayPal. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u0432\u0430\u0448\u043e\u0433\u043e \u043a\u043b\u0456\u0454\u043d\u0442\u0430 \u0442\u0430 \u0441\u0435\u043a\u0440\u0435\u0442 \u043a\u043b\u0456\u0454\u043d\u0442\u0430. \u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0441\u0432\u043e\u0457 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u0456 \u0434\u0430\u043d\u0456 <a href=\"https:\/\/developer.paypal.com\/developer\/applications\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0437\u0432\u0456\u0434\u0441\u0438<\/a>.<\/p>\n<p>\u041d\u0430 \u0446\u0456\u0439 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u041c\u043e\u0457 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438 \u0442\u0430 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u0456 \u0434\u0430\u043d\u0456 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u0456\u0442\u044c \u0443\u043d\u0438\u0437 \u0434\u043e \u0440\u043e\u0437\u0434\u0456\u043b\u0443 \u00ab\u0412\u0456\u0434\u043f\u043e\u0447\u0438\u043d\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c API\u00bb \u0442\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443\u00bb.<\/p>\n<p><a href=\"https:\/\/themewp.inform.click\/wp-content\/uploads\/2021\/04\/post-20926-60823d897ebfb.png\" data-rel=\"lightbox\"><img decoding=\"async\" class=\"SDStudio-light-box-enable SDStudio-editor-tools-md-imp\" src=\"https:\/\/themewp.inform.click\/wp-content\/uploads\/2021\/04\/post-20926-60823d897ebfb.png\" alt=\"\u041f\u043e\u0441\u0456\u0431\u043d\u0438\u043a \u0437 \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal \u043d\u0430 \u0432\u0430\u0448\u043e\u043c\u0443 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456 \u0432 PHP\" ><\/a><\/p>\n<p>\u0414\u0430\u0439\u0442\u0435 \u043d\u0430\u0437\u0432\u0443 \u0441\u0432\u043e\u0454\u043c\u0443 \u0434\u043e\u0434\u0430\u0442\u043a\u0443 \u0442\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 &quot;\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0434\u043e\u0434\u0430\u0442\u043e\u043a&quot;.<\/p>\n<p><a href=\"https:\/\/themewp.inform.click\/wp-content\/uploads\/2021\/04\/post-20926-60823d8a1a76b.png\" data-rel=\"lightbox\"><img decoding=\"async\" class=\"SDStudio-light-box-enable SDStudio-editor-tools-md-imp\" src=\"https:\/\/themewp.inform.click\/wp-content\/uploads\/2021\/04\/post-20926-60823d8a1a76b.png\" alt=\"\u041f\u043e\u0441\u0456\u0431\u043d\u0438\u043a \u0437 \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal \u043d\u0430 \u0432\u0430\u0448\u043e\u043c\u0443 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456 \u0432 PHP\" ><\/a><\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u0432\u0438\u0449\u0435\u0432\u043a\u0430\u0437\u0430\u043d\u0438\u0445 \u043a\u0440\u043e\u043a\u0456\u0432 \u0432\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u0442\u0435 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u0456 \u0434\u0430\u043d\u0456 \u044f\u043a \u0434\u043b\u044f \u043f\u0456\u0441\u043e\u0447\u043d\u0438\u0446\u0456, \u0442\u0430\u043a \u0456 \u0434\u043b\u044f \u0440\u0435\u0436\u0438\u043c\u0443 Live.<\/p>\n<p><a href=\"https:\/\/themewp.inform.click\/wp-content\/uploads\/2021\/04\/post-20926-60823d8a1a76b.png\" data-rel=\"lightbox\"><img decoding=\"async\" class=\"SDStudio-light-box-enable SDStudio-editor-tools-md-imp\" src=\"https:\/\/themewp.inform.click\/wp-content\/uploads\/2021\/04\/post-20926-60823d8a1a76b.png\" alt=\"\u041f\u043e\u0441\u0456\u0431\u043d\u0438\u043a \u0437 \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal \u043d\u0430 \u0432\u0430\u0448\u043e\u043c\u0443 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456 \u0432 PHP\" ><\/a><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440 \u043c\u0438 \u0433\u043e\u0442\u043e\u0432\u0456 \u0434\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440\u0430 \u043a\u043b\u0456\u0454\u043d\u0442\u0430 \u0442\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0438\u0445 \u043a\u043b\u044e\u0447\u0456\u0432 \u043a\u043b\u0456\u0454\u043d\u0442\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0440\u043e\u0431\u0438\u043c\u043e \u043a\u0440\u043e\u043a \u0432\u043f\u0435\u0440\u0435\u0434 \u0456 \u043d\u0430\u043f\u0438\u0448\u0435\u043c\u043e \u0448\u043c\u0430\u0442\u043e\u043a \u043a\u043e\u0434\u0443.<\/p>\n<h3>\u0424\u0430\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal<\/h3>\n<p>\u041d\u0430 \u0446\u044c\u043e\u043c\u0443 \u0435\u0442\u0430\u043f\u0456 \u043c\u0438 \u0433\u043e\u0442\u043e\u0432\u0456 \u0434\u043e \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0438 \u0442\u0430 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u0438\u0445 \u0434\u0430\u043d\u0438\u0445. \u0422\u0435\u043f\u0435\u0440 \u0434\u043b\u044f \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u0457 PayPal \u0443 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e 4 \u0444\u0430\u0439\u043b\u0438:<\/p>\n<p><code>checkout.php<\/code>: \u0423 \u0446\u044c\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0456 \u043c\u0438 \u043c\u0430\u0454\u043c\u043e \u0444\u043e\u0440\u043c\u0443, \u044f\u043a\u0430 \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0443 \u0442\u0430 \u0441\u0443\u043c\u0443 \u0442\u043e\u0432\u0430\u0440\u0443.<br \/>\n<code>payment.php<\/code>: \u0426\u0435 \u0444\u0430\u0439\u043b, \u0432 \u044f\u043a\u0438\u0439 \u043c\u0438 \u043f\u0438\u0448\u0435\u043c\u043e \u0432\u0435\u0441\u044c \u043f\u043e\u0432&#8217;\u044f\u0437\u0430\u043d\u0438\u0439 \u0437 PayPal \u043a\u043e\u0434.<br \/>\n<code>success.php<\/code>: \u041f\u0456\u0441\u043b\u044f \u0443\u0441\u043f\u0456\u0448\u043d\u043e\u0457 \u043e\u043f\u043b\u0430\u0442\u0438 \u043a\u043b\u0456\u0454\u043d\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0446\u0435\u0439 \u0444\u0430\u0439\u043b.<br \/>\n<code>error.php<\/code>: \u042f\u043a\u0449\u043e \u043f\u043b\u0430\u0442\u0456\u0436 \u043d\u0435 \u0432\u0434\u0430\u0432\u0441\u044f, \u043a\u043b\u0456\u0454\u043d\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0454 \u043d\u0430 \u0446\u0435\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p><strong>checkout.php<\/strong><\/p>\n<pre><code>&lt;form action=\"payment.php\" method=\"post\"&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;input type=\"text\" name=\"item\" placeholder=\"Enter Item Name\"&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;input type=\"text\" name=\"amount\" placeholder=\"Enter Amount\"&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;input type=\"submit\" name=\"submit\" value=\"Pay\"&gt;\n&lt;\/form&gt;<\/code><\/pre>\n<p><strong>\u043f\u043b\u0430\u0442\u0456\u0436.php<\/strong><\/p>\n<pre><code>&lt;?php\nrequire_once 'vendor\/autoload.php';\n\u00a0\nuse PayPalApiItem;\nuse PayPalApiItemList;\n\u00a0\n$apiContext = new PayPalRestApiContext(\n\u00a0\u00a0\u00a0\u00a0new PayPalAuthOAuthTokenCredential(\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'YOUR_CLIENT_ID',\u00a0\u00a0\u00a0\u00a0 \/\/ ClientID\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'YOUR_CLIENT_SECRET'\u00a0 \/\/ ClientSecret\n\u00a0\u00a0\u00a0\u00a0)\n);\n\u00a0\n$apiContext-&gt;setConfig(\n\u00a0\u00a0\u00a0\u00a0array(\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'log.LogEnabled' =&gt; true,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'log.FileName' =&gt; 'PayPal.log',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'log.LogLevel' =&gt; 'DEBUG',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'mode' =&gt; 'sandbox', \/\/'live' or 'sandbox'\n\u00a0\u00a0\u00a0\u00a0)\n);\n\u00a0\n$payer = new PayPalApiPayer();\n$payer-&gt;setPaymentMethod('paypal');\n\u00a0\n$item1 = new Item();\n$item1-&gt;setName($_POST['item'])\n\u00a0\u00a0\u00a0\u00a0-&gt;setCurrency('USD')\n\u00a0\u00a0\u00a0\u00a0-&gt;setQuantity(1)\n\u00a0\u00a0\u00a0\u00a0-&gt;setPrice($_POST['amount']);\n\u00a0\n$itemList = new ItemList();\n$itemList-&gt;setItems(array($item1));\n\u00a0\n$amount = new PayPalApiAmount();\n$amount-&gt;setTotal($_POST['amount']);\n$amount-&gt;setCurrency('USD');\n\u00a0\n$transaction = new PayPalApiTransaction();\n$transaction-&gt;setDescription(\"Payment For Service\")\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-&gt;setItemList($itemList)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-&gt;setAmount($amount);\n\u00a0\n$redirectUrls = new PayPalApiRedirectUrls();\n$redirectUrls-&gt;setReturnUrl(\"YOUR_HTTP_PATH\/success.php\")\n\u00a0\u00a0\u00a0\u00a0-&gt;setCancelUrl(\"YOUR_HTTP_PATH\/error.php\");\n\u00a0\n$payment = new PayPalApiPayment();\n$payment-&gt;setIntent('sale')\n\u00a0\u00a0\u00a0\u00a0-&gt;setPayer($payer)\n\u00a0\u00a0\u00a0\u00a0-&gt;setTransactions(array($transaction))\n\u00a0\u00a0\u00a0\u00a0-&gt;setRedirectUrls($redirectUrls);\n\u00a0\n\/\/ 4. Make a Create Call\ntry {\n\u00a0\u00a0\u00a0\u00a0$payment-&gt;create($apiContext);\n\u00a0\n\u00a0\u00a0\u00a0\u00a0header('Location: '. $payment-&gt;getApprovalLink());\n}\ncatch (PayPalExceptionPayPalConnectionException $ex) {\n\u00a0\u00a0\u00a0\u00a0\/\/ This will print the detailed information on the exception.\n\u00a0\u00a0\u00a0\u00a0\/\/REALLY HELPFUL FOR DEBUGGING\n\u00a0\u00a0\u00a0\u00a0echo $ex-&gt;getData();\n}\n?&gt;<\/code><\/pre>\n<p>\u041e\u0431\u043e\u0432&#8217;\u044f\u0437\u043a\u043e\u0432\u043e \u0437\u0430\u043c\u0456\u043d\u0456\u0442\u044c \u0437\u0430\u043f\u043e\u0432\u043d\u044e\u0432\u0430\u0447\u0456 \u0444\u0430\u043a\u0442\u0438\u0447\u043d\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f\u043c\u0438. \u0423 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043e\u043c\u0443 \u0432\u0438\u0449\u0435 \u043a\u043e\u0434\u0456 \u043c\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0440\u0435\u0436\u0438\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f &quot;\u043f\u0456\u0441\u043e\u0447\u043d\u0438\u0446\u044f&quot;. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u044f\u0447\u0438 \u0434\u043e \u0432\u0438\u0440\u043e\u0431\u043d\u0438\u0446\u0442\u0432\u0430, \u0437\u0440\u043e\u0431\u0456\u0442\u044c \u0446\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f &quot;\u0436\u0438\u0432\u0438\u043c&quot; \u0442\u0430 \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0441\u0432\u0456\u0439 \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043a\u043b\u0456\u0454\u043d\u0442\u0430 \u0442\u0430 \u0441\u0435\u043a\u0440\u0435\u0442 \u043a\u043b\u0456\u0454\u043d\u0442\u0430.<\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0443 \u043e\u043f\u043b\u0430\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 PayPal, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u0443\u0441\u043f\u0456\u0448\u043d\u043e\u0433\u043e \u0430\u0431\u043e \u043d\u0435\u0432\u0434\u0430\u043b\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0443, \u0432\u0456\u043d \u0431\u0443\u0434\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0434\u043e \u0444\u0430\u0439\u043b\u0443 success.php \u0430\u0431\u043e error.php.<\/p>\n<p><strong>\u0443\u0441\u043f\u0456\u0445.php<\/strong><\/p>\n<pre><code>&lt;h2&gt;Payment Successful.&lt;\/h2&gt;<\/code><\/pre>\n<p><strong>\u043f\u043e\u043c\u0438\u043b\u043a\u0430.php<\/strong><\/p>\n<pre><code>&lt;h2&gt;Something went wrong. Try again later.&lt;\/h2&gt;<\/code><\/pre>\n<p>\u041c\u0438 \u0441\u043f\u043e\u0434\u0456\u0432\u0430\u0454\u043c\u043e\u0441\u044c, \u0432\u0438 \u0440\u043e\u0437\u0443\u043c\u0456\u0454\u0442\u0435 \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u044e PayPal \u0443 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u043e\u0434\u0456\u043b\u0456\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0457\u043c\u0438 \u0434\u0443\u043c\u043a\u0430\u043c\u0438 \u0432 \u0440\u043e\u0437\u0434\u0456\u043b\u0456 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0456\u0432 \u043d\u0438\u0436\u0447\u0435.<\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443: artisansweb.net<\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0443 \u043c\u0438 \u0432\u0438\u0432\u0447\u0430\u0454\u043c\u043e \u0456\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0456\u044e PayPal \u0443 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443. \u0414\u043b\u044f \u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u043c\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u043e \u043e\u0444\u0456\u0446\u0456\u0439\u043d\u0443 \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0443 GitHub \u0434\u043b\u044f PHP. \u0414\u0430\u043b\u0456 \u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0443\u0454\u043c\u043e<\/p>\n","protected":false},"author":1,"featured_media":21797,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[153],"tags":[851],"class_list":["post-26566","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-153","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/posts\/26566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/comments?post=26566"}],"version-history":[{"count":1,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/posts\/26566\/revisions"}],"predecessor-version":[{"id":513233,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/posts\/26566\/revisions\/513233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/media\/21797"}],"wp:attachment":[{"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/media?parent=26566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/categories?post=26566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themewp.inform.click\/uk\/wp-json\/wp\/v2\/tags?post=26566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}