{"id":60696,"date":"2025-04-26T09:56:48","date_gmt":"2025-04-26T01:56:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60696\/"},"modified":"2025-04-26T09:56:48","modified_gmt":"2025-04-26T01:56:48","slug":"zencart%e9%92%88%e5%af%b9paypal%e9%98%b2%e6%bc%8f%e5%8d%95%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60696\/","title":{"rendered":"zencart\u9488\u5bf9paypal\u9632\u6f0f\u5355\u65b9\u6cd5"},"content":{"rendered":"<p>zencart\u9488\u5bf9\u9664\u4e86paypal\u4e4b\u5916. \u5ba2\u6237\u901a\u8fc7\u5176\u4ed6\u7684\u652f\u4ed8\u65b9\u5f0f\u8fdb\u5165index.php?main_page=checkout_confirmation\u8fd9\u4e2a\u9875\u9762\u5c31\u80fd\u751f\u51fa\u8ba2\u5355.paypal\u5c31\u6709\u70b9\u4e0e\u4f17\u4e0d\u540c, \u5b83\u53ea\u80fd\u662f\u4ece\u5b83\u7684\u5b98\u7f51 [paypal.com] \u8fd4\u56de\u6765\u5e76\u4e14\u8fdb\u5165checkout_process\u8fd9\u4e2a\u9875\u9762\u540e,\u624d\u80fd\u751f\u51fa\u8ba2\u5355,\u800c\u610f\u5916\u5e38\u4f1a\u53d1\u751f:\u6bd4\u5982\u7f51\u7edc\u4e0d\u987a. \u53c8\u6bd4\u5982\u5ba2\u6237\u4e0d\u5c0f\u5fc3\u5728\u8fd4\u56de\u524d\u5c31\u5173\u4e86\u9875\u9762.<\/p>\n<p>  &nbsp;   paypal\u9632\u6f0f\u5355\u7684\u539f\u7406\u5c31\u662f\u2014\u2014\u5728 checkout_confirmation.php\u8fd9\u4e2a\u9875\u9762\u5148\u751f\u51fa\u8ba2\u5355!!!\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5   &nbsp;   &nbsp;   \u65b9\u6cd5\u662f\uff1a\u5728\u8fd9\u4e2a\u6587\u4ef6\u7684\u6700\u540e\u90e8\u5206echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . \u2018&lt;br \/&gt;\u2019 . TEXT_CONTINUE_CHECKOUT_PROCEDURE;   &nbsp;   &nbsp;   \u540e\u9762\u6dfb\u52a0\u4ee3\u7801\uff1a   &nbsp;   \/\/ create the order record \u9632\u6f0f\u5355&nbsp;   &nbsp;   &nbsp;   &nbsp;   if ($_SESSION[&#8216;payment&#8217;] == \u2018paypal\u2019) {&nbsp;   &nbsp;   $insert_id = $order-&gt;create($order_totals, 2);   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE\u2019);   &nbsp;   $payment_modules-&gt;after_order_create($insert_id);   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE\u2019);   &nbsp;   \/\/ store the product info to the order   &nbsp;   $order-&gt;create_add_products($insert_id);   &nbsp;   $_SESSION[&#8216;order_number_created&#8217;] = $insert_id;   &nbsp;   &nbsp;   \u4e3a\u4e86\u907f\u514d\u5bf9\u5176\u4ed6\u652f\u4ed8\u65b9\u5f0f\u4ea7\u751f\u5f71\u54cd\uff0c\u4ee3\u7801\u505a\u4e86\u4e2a\u5224\u65ad\uff0c\u53ea\u6709paypal\u652f\u4ed8\u4f1a\u8fd0\u884c\u8fd9\u4e9b\u751f\u6210\u8ba2\u5355\u7684\u4ee3\u7801\uff0c\u52a0\u4e86\u8fd9\u6bb5\u540e\u5c31\u4e0d\u7528\u62c5\u5fc3\u4f1a\u6f0f\u5355\u4e86\u2014\u6210\u529f\u4ed8\u6b3e\u540e\u540e\u53f0\u8ba2\u5355\u5982\u56fe\uff1a   &nbsp;   &nbsp;   \u5176\u4e2dGS\/AK\u7684\u4e3a\u9632\u6f0f\u5355\u7684\u8ba2\u5355\uff0c\u53ea\u6709\u5728\u51fa\u73b0\u6f0f\u5355\u7684\u65f6\u5019\u624d\u4f1a\u67e5\u770b\u8fd9\u4e9b\u8ba2\u5355\uff0c\u91cc\u9762\u7684\u4fe1\u606f\u8ddf\u6b63\u5e38\u8ba2\u5355\u76f8\u6bd4\u4f1a\u5c11\u4e00\u4e2a\u4ea4\u6613\u53f7\uff0c\u4f46\u662f\u81f3\u5c11\u662f\u53ef\u4ee5\u770b\u5230\u5ba2\u6237\u4fe1\u606f\u53ca\u6240\u8d2d\u4e70\u4e86\u4ec0\u4e48\u4ea7\u54c1\u2026   &nbsp;   &nbsp;   \u5982\u679c\u9700\u8981\u66f4\u5b8c\u7f8e\u7684\u505a\u6cd5, &nbsp; &nbsp; \u4e3a\u9632\u6b62\u987e\u5ba2\u5728\u8bbf\u95eecheckout process\u7684\u65f6\u5019\u4f1a\u91cd\u590d\u751f\u6210\u8ba2\u5355, \u90a3\u4e48\u5c31\u9700\u8981\u52a0\u4e2a\u5224\u65ad   &nbsp;   &nbsp;   if($_SESSION[&#8216;payment&#8217;]!=\u2019paypal\u2019){   &nbsp;   &nbsp;   \/*\/\/ create the order record   &nbsp;   &nbsp;   $insert_id = $order-&gt;create($order_totals, 2);   &nbsp;   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE\u2019);   &nbsp;   &nbsp;   $payment_modules-&gt;after_order_create($insert_id);   &nbsp;   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE\u2019);   &nbsp;   &nbsp;   \/\/ store the product info to the order   &nbsp;   &nbsp;   $order-&gt;create_add_products($insert_id);   &nbsp;   &nbsp;   $_SESSION[&#8216;order_number_created&#8217;] = $insert_id;   &nbsp;   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE_ADD_PRODUCTS\u2019);   &nbsp;   &nbsp;   \/\/send email notifications   &nbsp;   &nbsp;   $order-&gt;send_order_email($insert_id, 2);   &nbsp;   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL\u2019);*\/   &nbsp;   &nbsp;   }   &nbsp;   \u800c\u4e14\u5728\u786e\u8ba4\u9875\u9762\uff0c\u5982\u679c\u987e\u5ba2\u4e00\u76f4\u5237\u65b0\u9875\u9762\uff0c\u5c31\u4f1a\u4e00\u76f4\u751f\u6210\u8ba2\u5355\uff0c\u53ef\u4ee5\u52a0\u4e2a\u9650\u5236.   &nbsp;   \/\/ create the order record \u9632\u6f0f\u5355   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   if ($_SESSION[&#8216;payment&#8217;] == \u2018paypal\u2019 and !isset($_SESSION[&#8216;order_number_created&#8217;])) {   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   $insert_id = $order-&gt;create($order_totals, 2);   &nbsp;   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE\u2019);   &nbsp;   &nbsp;   $payment_modules-&gt;after_order_create($insert_id);   &nbsp;   &nbsp;   $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE\u2019);   &nbsp;   &nbsp;   \/\/ store the product info to the order   &nbsp;   &nbsp;   $order-&gt;create_add_products($insert_id);   &nbsp;   &nbsp;   $_SESSION[&#8216;order_number_created&#8217;] = $insert_id;   &nbsp;   &nbsp;   }   &nbsp;   \u5728pages\/checkout_payment\/header_php.php\u4efb\u610f\u4f4d\u7f6e\u52a0\u4e0aunset($_SESSION[&#8216;order_number_created&#8217;]);   &nbsp;   \u8fd9\u6837,\u5c31\u7b97\u987e\u5ba2\u5728\u786e\u8ba4\u9875\u9762\u4e00\u76f4\u5237\u65b0\uff0c\u56e0\u4e3a\u5df2\u7ecf\u8bbe\u7f6e\u4e86$_SESSION[&#8216;order_number_created&#8217;]\uff0c\u8ba2\u5355\u4e0d\u518d\u751f\u6210\uff0c   <\/p>\n","protected":false},"excerpt":{"rendered":"<p>zencart\u9488\u5bf9\u9664\u4e86paypal\u4e4b\u5916. \u5ba2\u6237\u901a\u8fc7\u5176\u4ed6\u7684\u652f\u4ed8\u65b9\u5f0f\u8fdb\u5165index.php?main_page=checkout_confirmation\u8fd9\u4e2a\u9875\u9762\u5c31\u80fd\u751f\u51fa\u8ba2\u5355.paypal\u5c31\u6709\u70b9\u4e0e\u4f17\u4e0d\u540c, \u5b83\u53ea\u80fd\u662f\u4ece\u5b83\u7684\u5b98\u7f51 [paypal.com] \u8fd4\u56de\u6765\u5e76\u4e14\u8fdb\u5165checkout_process\u8fd9\u4e2a\u9875\u9762\u540e,\u624d\u80fd\u751f\u51fa\u8ba2\u5355,\u800c\u610f\u5916\u5e38\u4f1a\u53d1\u751f:\u6bd4\u5982\u7f51\u7edc\u4e0d\u987a. \u53c8\u6bd4\u5982\u5ba2\u6237\u4e0d\u5c0f\u5fc3\u5728\u8fd4\u56de\u524d\u5c31\u5173\u4e86\u9875\u9762. &nbsp; paypal\u9632\u6f0f\u5355\u7684\u539f\u7406\u5c31\u662f\u2014\u2014\u5728 checkout_confirmation.php\u8fd9\u4e2a\u9875\u9762\u5148\u751f\u51fa\u8ba2\u5355!!!\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5 &nbsp; &nbsp; \u65b9\u6cd5\u662f\uff1a\u5728\u8fd9\u4e2a\u6587\u4ef6\u7684\u6700\u540e\u90e8\u5206echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . \u2018&lt;br \/&gt;\u2019 . TEXT_CONTINUE_CHECKOUT_PROCEDURE; &nbsp; &nbsp; \u540e\u9762\u6dfb\u52a0\u4ee3\u7801\uff1a &nbsp; \/\/ create the order record \u9632\u6f0f\u5355&nbsp; &nbsp; &nbsp; &nbsp; if ($_SESSION[&#8216;payment&#8217;] == \u2018paypal\u2019) {&nbsp; &nbsp; $insert_id = $order-&gt;create($order_totals, 2); &nbsp; $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE\u2019); &nbsp; $payment_modules-&gt;after_order_create($insert_id); &nbsp; $zco_notifier-&gt;notify(\u2018NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE\u2019); &nbsp; \/\/ store the product info to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-60696","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=60696"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60696\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}