{"id":2590,"date":"2025-05-12T14:26:21","date_gmt":"2025-05-12T06:26:21","guid":{"rendered":"https:\/\/www.deekpay.com\/?p=2590"},"modified":"2025-05-12T14:26:21","modified_gmt":"2025-05-12T06:26:21","slug":"%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.deekpay.com\/zh\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/","title":{"rendered":"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f"},"content":{"rendered":"<h1>\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u7684\u6307\u5357<\/h1>\n<p>\u8981\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff0c\u60a8\u9700\u8981\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\u3002\u6211\u5c06\u4ee5\u51e0\u4e2a\u6d41\u884c\u7684\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u4e3a\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002<\/p>\n<h2>\u5e38\u89c1\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u9009\u62e9<\/h2>\n<ol>\n<li><strong>VNPay<\/strong> \u2013 \u6700\u53d7\u6b22\u8fce\u7684\u672c\u5730\u652f\u4ed8\u89e3\u51b3\u65b9\u6848\u4e4b\u4e00<\/li>\n<li><strong>Momo<\/strong> \u2013 \u79fb\u52a8\u94b1\u5305\u652f\u4ed8<\/li>\n<li><strong>ZaloPay<\/strong> \u2013 \u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u7535\u5b50\u94b1\u5305<\/li>\n<li><strong>OnePay<\/strong> \u2013 Visa\/MasterCard\u5904\u7406\u5546<\/li>\n<\/ol>\n<h2>VNPay\u96c6\u6210\u793a\u4f8b<\/h2>\n<h3>1. \u51c6\u5907\u5de5\u4f5c<\/h3>\n<ul>\n<li><a href=\"https:\/\/vnpay.vn\/\">\u6ce8\u518cVNPay\u5546\u6237\u8d26\u6237<\/a><\/li>\n<li>\u83b7\u53d6\u5546\u6237ID(<code>vnp_TmnCode<\/code>)\u548c\u5bc6\u94a5(<code>vnp_HashSecret<\/code>)<\/li>\n<li>VNPay\u63d0\u4f9b\u7684API\u6587\u6863\u548c\u7aef\u70b9URL<\/li>\n<\/ul>\n<h3>2. PHP\u96c6\u6210\u4ee3\u7801\u793a\u4f8b<\/h3>\n<pre><code class=\"language-php\">&lt;?php<br>\r\n\/\/ config.php - VNPay\u914d\u7f6e\u53c2\u6570<br>\r\n$vnp_Url = &quot;https:\/\/sandbox.vnpayment.vn\/paymentv2\/vpcpay.html&quot;;<br>\r\n$vnp_Returnurl = &quot;https:\/\/yourdomain.com\/return_url.php&quot;; \/\/\u56de\u8c03URL<br>\r\n$vnp_TmnCode = &quot;YOUR_MERCHANT_CODE&quot;; \/\/\u5546\u6237\u53f7 <br>\r\n$secretKey = &quot;YOUR_SECRET_KEY&quot;; \/\/\u5b89\u5168\u5bc6\u94a5 <br>\r\n<br>\r\n\/\/ vnpay_create_payment.php -\u521b\u5efa\u4ed8\u6b3e\u8bf7\u6c42 <br>\r\nfunction createVNPayPayment($orderId, $amount, $orderInfo) {<br>\r\n    global $vnp_Url, $vnp_Returnurl, $vnp_TmnCode, $secretKey;<br>\r\n    <br>\r\n    date_default_timezone_set('Asia\/Ho_Chi_Minh');<br>\r\n    <br>\r\n    \/\/\u51c6\u5907\u53c2\u6570\u6570\u7ec4 <br>\r\n    $inputData = array(<br>\r\n        &quot;version&quot; =&gt; &quot;2&quot;,<br>\r\n        &quot;command&quot; =&gt; &quot;pay&quot;,<br>\r\n        'merchant' =&gt; 'VNPAY',<br>\r\n        'tmn_code' =&gt; trim($tmnCode),<br>\r\n        'create_date' =&gt; date('YmdHis'),<br>\r\n        'expire_date' =&gt; date('YmdHis', strtotime('+15 minutes')),<br>\r\n        <br>\r\n        \/\/\u8ba2\u5355\u4fe1\u606f <br>\r\n        'order_id' =&gt; time(),<br>\r\n        <br>\r\n         \/\/\u91d1\u989d(\u5355\u4f4d\u4e3aVND)<br>\r\n         'amount'=&gt; intval(str_replace(',','',$amount))*100,<br>\r\n         <br>\r\n         \/\/\u8ba2\u5355\u63cf\u8ff0  <br>\r\n         'order_desc'=&gt; urlencode($orderInfo),<br>\r\n         <br>\r\n          return_url=&gt; urlencode($return_url),   <br>\r\n          <br>\r\n           ip_address=&gt; $_SERVER['REMOTE_ADDR'],     <br>\r\n           <br>\r\n            currency=&gt;&quot;VND&quot;,      <br>\r\n            <br>\r\n             locale=&gt; ($lang == &quot;&quot;) ? vn : en,<br>\r\n              <br>\r\n              bank_code=&gt; &quot;&quot;,<br>\r\n                );<br>\r\n                <br>\r\n     ksort($inputData);<br>\r\n     <br>\r\n      query=&quot;&quot;;<br>\r\n      foreach ($inputData as key value){<br>\r\n          if(substr(key0)==&quot;_&quot;) continue;<br>\r\n          if(!empty(query)) query.= &amp;&quot;.key.&quot;=&quot;.$value; else query=key.&quot;=&quot;.$value;}<br>\r\n          <br>\r\n       secureHash=hash(&quot;sha256&quot;, secret_key.query);       <br>\r\n       <br>\r\n       inputData[&quot;secure_hash&quot;]=$secureHash;      <br>\r\n       <br>\r\n       paymentUrl=vpn_URL .&quot;?&quot;.http_build_query(input_data);      <br>\r\n       <br>\r\n       header(&quot;Location: &quot;.payment_url); exit();}<br>\r\n<\/code><\/pre>\n<h2>Momo Wallet\u96c6\u6210\u793a\u4f8b<\/h2>\n<pre><code class=\"language-php\">&lt;?php <br>\r\n\/\/ momo_config.php <br>\r\ndefine(\"PARTNER_CODE\", \"\");\/\/Your partner code from MoMo\");<br>\r\ndefine(\"ACCESS_KEY\",\"\"); \/\/\/Your access key from MoMo\");<br>\r\ndefine(\"SECRET_KEY\",\"\"); \/\/\/Your secret key from MoMo\");<br>\r\n<br>\r\nfunction execPostRequest(url data){<br>\r\n     ch curl_init();<br>\r\n     curl_setopt(ch CURLOPT_URL url);<br>\r\n     curl_setopt(ch CURLOPT_POST true);<br>\r\n     curl_setopt(ch CURLOPT_POSTFIELDS data);<br>\r\n     curl_setopt(ch CURLOPT_USERAGENT $_SERVER['HTTP_USER_AGENT']);<br>\r\n     curl_setopt(ch CURLOPT_RETURNTRANSFER true);<br>\r\n     <br>\r\n      result=curl_exec ch );curl_close ch ); return result;}<br>\r\n      <br>\r\n function createMomoPayment(orderId amount orderInfo callbackUrl redirectUrl){   <br>\r\n      endpoint =\"https:\/\/test-payment.momo.vn\/gw_payment\/transactionProcessor\";<br>\r\n      <br>\r\n       requestId time().\"\";\/\/unique id for each request<br>\r\n        <br>\r\n         rawHash =\"partnerCode=\" PARTNER CODE.<br>\r\n                  &amp;accessKey ACCESS KEY.<br>\r\n                  &amp;requestId request Id.<br>\r\n                  &amp;amount amount.<br>\r\n                  &amp;orderId order Id .<br>\r\n                   order info .<br>\r\n                   return Url callback Url .<br>\r\n                    notify Url callback Url .extra Data \"\";<br>\r\n                    <br>\r\n                     signature hash hmac sha256 raw Hash SECRET KEY));<br>\r\n                     data array(<br>\r\n                         partner Code PARTNER CODE ,<br>\r\n                          access Key ACCESS KEY ,<br>\r\n                           request Id request Id ,<br>\r\n                            amount amount ,                              <br>\r\n                             order Id order ID ,                               <br>\r\n            <br>\r\n                              Order Info urldecode(order Info ),                                <br>\r\n            <br>\r\n                               Return URL redirect URL ,                                   <br>\r\n            <br>\r\n                                Notify URL call back URl ,                                       <br>\r\n            <br>\r\n                                 extra Data \"\",                                              <br>\r\n            <br>\r\n                                  Request Type capture MO wallet \",                                           <br>\r\n            <br>\r\n                                   Signature signature ) ;                                          <br>\r\n<br>\r\nJSON encode(data));                                                                                  <br>\r\n<br>\r\nresponse exec Post Request(endpoint json encodedata));                                                 <br>\r\n<br>\r\njson decode(response true);                                                                              <br>\r\n<br>\r\n<br>\r\nif isset(result pay UrL )) header Location result pay UrL ]); else echo Error creating payment ;}?&gt;<br>\r\n<\/code><\/pre>\n<h2>Zalo Pay\u96c6\u6210\u793a\u4f8b\uff08\u7c7b\u4f3c\u7ed3\u6784\uff09<\/h2>\n<pre><code class=\"language-php\"> <br>\r\nclass ZalopayHelper {    <br>\r\n<br>\r\nconst APP_ID your app id ;<br>\r\nconst KEY1 your key1 ;<br>\r\nconst EMBED DATA [\" merchantinfo\"=&gt; embeddata json encode([\" merchant name\"=&gt; Your Store Name ])];<br>\r\n<br>\r\npublic static function CreateOrder( string description long price string callback url ){<br>\r\ndate default timezone set Asia Ho Chi Minh );<br>\r\n<br>\r\ntimestamp round(microtime(true)*1000);<br>\r\n<br>\r\nparams [<br>\r\nappid self APP ID,<br>\r\napptransid date(Ymd)._. timestamp,# format yyMMdd timestamp e.g21092740765200<br>\r\n    <br>\r\n appuser Zalo Pay Demo m desc description,<br>\r\n<br>\r\n amoun tprice ,<br>\r\n<br>\r\n item JSON encode([]),<br>\r\n<br>\r\n bankcode zalopayapp ,<br>\r\n<br>\r\ncallbackurl call back ur l ];<br>\r\n<br>\r\nMac=self Compute Mac(params);<br>\r\n<br>\r\nparams[ mac]=Mac;<br>\r\n<br>\r\nresponse Http Helper post https sb openapi zalopay vn \/vp\/create params );<br>\r\n<br>\r\nreturn json decode response body ) ;<br>\r\n<br>\r\n}<br>\r\n<br>\r\nprivate static function Compute Mac(array params ):string {<br>\r\n<br>\r\norderedParams [];<br>\r\n<br>\r\nforeach ([ appid , apptransid , appuser amoun t apptime emb edda ta item ]as param){<br>\r\n<br>\r\nif isset params param]) ordered Params[]=$param.'='.$params[$param];}<br>\r\n<br>\r\nmessage implode(&amp; ordered Params );<br>\r\n<br>\r\nreturn hash hmac sha256 message self::KEY one false );}}<br>\r\n<\/code><\/pre>\n<h2>One Pay\u56fd\u9645\u5361\u5904\u7406\uff08\u9002\u7528\u4e8e\u4fe1\u7528\u5361\uff09<\/h2>\n<pre><code class=\"language-php\"> <br>\r\nclass One PayInternational {<br>\r\n<br>\r\nprivate static endpoint sandbox onep ay international com api\/v two \/processor ;<br>\r\n<br>\r\npublic static process Payment card Number expiry Month expiry Year cv vAmount currency Description ){<br>\r\ndate default timezone set Asia Ho Chi Minh );<br>\r\nnonce bin hex random bytes sixteen ));<br>\r\n<br>\r\npost Fields [<br>\r\nnumber card Number ],<br>\r\nexp month expiry Month ],<br>\r\nexp year expiry Year ],cvv cv v],<br>\r\ncurrency str toupper currency ),<br>\r\namoun tround float val Amount *100 ),# in cents\/pence\/etc.<br>\r\n<br>\r\ndescription substr Description fifty ),<br>\r\nthree DSecure false ];<br>\r\n<br>\r\njson payload json encode post fields base sixty four encode nonce.json payload));<br>\r\n<br>\r\nsignature base sixty four encode hash hmac sha two five six nonce.payload YOUR API SECRE Ttrue));<br>\r\n<br>\r\nheaders [<br>\r\n<br>\r\nContent Type application\/json',<br>\r\n<br>\r\nAuthorization Bearer.YOUR API TOKEN ,<br>\r\n<br>\r\nSignature.signature ];<br>\r\n<br>\r\nch init();<br>\r\n<br>\r\nset opt ch,CUR LOP TSSL VERIFYPEERfalse);<br>\r\n<br>\r\nset opt ch,CUR LOP THEADE R headers );<br>\r\n<br>\r\nset optch CUR LOP POSTtrue);<br>\r\n<br>\r\nset optch CUR LOP POS TFIELDS payload );<br>\r\n<br>\r\nset optch CUR LOP RET UR NTR ANSFE Rtrue);<br>\r\n<br>\r\n<br>\r\nexec curlexe cch close (ch return response ;}}<br>\r\n<br>\r\n?&gt;\"<br>\r\n<\/code><\/pre>\n<p>\u91cd\u8981\u63d0\u793a\uff1a<\/p>\n<p>\u6240\u6709\u4e0a\u8ff0\u4ee3\u7801\u4ec5\u4e3a\u57fa\u672c\u6846\u67b6\uff0c\u5b9e\u9645\u5b9e\u73b0\u65f6\u9700\u6ce8\u610f\uff1a<br \/>\n\u5b89\u5168\u6027\u63aa\u65bd\u5982\u8f93\u5165\u9a8c\u8bc1\u3001\u9519\u8bef\u5904\u7406\u548c\u65e5\u5fd7\u8bb0\u5f55\u5fc5\u987b\u5230\u4f4d\u3002<br \/>\n\u751f\u4ea7\u73af\u5883\u5e94\u4f7f\u7528HTTPS\u5e76\u5b58\u50a8\u654f\u611f\u6570\u636e\u5728\u5b89\u5168\u4f4d\u7f6e\u3002<br \/>\n\u6839\u636e\u6700\u65b0API\u6587\u6863\u8c03\u6574\u53c2\u6570\u540d\u79f0\u548c\u503c\u683c\u5f0f\u3002<\/p>\n<p>\u5efa\u8bae\u5148\u5728\u5404\u652f\u4ed8\u7684\u6c99\u76d2\u73af\u5883\u4e2d\u6d4b\u8bd5\u60a8\u7684\u5b9e\u73b0\u3002<\/p>\n<h1>\u7ee7\u7eedPHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u7684\u8be6\u7ec6\u6307\u5357<\/h1>\n<p>\u4e0b\u9762\u6211\u5c06\u66f4\u6df1\u5165\u5730\u4ecb\u7ecd\u5982\u4f55\u5b8c\u5584\u652f\u4ed8\u96c6\u6210\uff0c\u5305\u62ec\u56de\u8c03\u5904\u7406\u3001\u5b89\u5168\u63aa\u65bd\u548c\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h2>1. VNPay\u56de\u8c03\u5904\u7406\u5b9e\u73b0<\/h2>\n<p>\u5f53\u7528\u6237\u5b8c\u6210\u652f\u4ed8\u540e\uff0cVNPay\u4f1a\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u901a\u77e5\u4f60\u7684\u7cfb\u7edf\uff1a<\/p>\n<ul>\n<li><strong>\u6d4f\u89c8\u5668\u91cd\u5b9a\u5411<\/strong>\uff08return_url\uff09<\/li>\n<li><strong>\u670d\u52a1\u5668\u5f02\u6b65\u901a\u77e5<\/strong>\uff08IPN \u2013 Instant Payment Notification\uff09<\/li>\n<\/ul>\n<h3>return_url.php\u793a\u4f8b\u4ee3\u7801<\/h3>\n<pre><code class=\"language-php\">&lt;?php<br>\r\n\/\/ config.php<br>\r\nrequire_once('config.php');<br>\r\n<br>\r\n\/\/ \u83b7\u53d6\u6240\u6709GET\u53c2\u6570<br>\r\n$vnp_Params = $_GET;<br>\r\n$secureHash = $vnp_Params['vnp_SecureHash'];<br>\r\nunset($vnp_Params['vnp_SecureHash']);<br>\r\n<br>\r\n\/\/ \u6309\u5b57\u6bcd\u987a\u5e8f\u6392\u5e8f\u53c2\u6570<br>\r\nksort($vnp_Params);<br>\r\n<br>\r\n\/\/ \u751f\u6210\u9a8c\u8bc1\u7528\u7684hash\u503c<br>\r\n$hashData = \"\";<br>\r\nforeach ($vnp_Params as $key =&gt; $value) {<br>\r\n    if (substr($key, 0, 4) == \"vnp_\") {<br>\r\n        $hashData .= urlencode($key) . \"=\" . urlencode($value) . \"&amp;\";<br>\r\n    }<br>\r\n}<br>\r\n$hashData = rtrim($hashData, '&amp;');<br>\r\n<br>\r\n$secureSecret = $secretKey; \/\/ from config.php<br>\r\n$mySecureHash = hash_hmac('sha512', $hashData, $secureSecret);<br>\r\n<br>\r\nif ($mySecureHash === $secureHash) {<br>\r\n    if ($_GET['vnP_ResponseCode'] == '00') {<br>\r\n        \/\/ \u4ed8\u6b3e\u6210\u529f\u903b\u8f91<br>\r\n        <br>\r\n        \/*<br>\r\n         * TODO: <br>\r\n         * - \u66f4\u65b0\u8ba2\u5355\u72b6\u6001\u4e3a\u5df2\u4ed8\u6b3e <br>\r\n         * - \u8bb0\u5f55\u4ea4\u6613\u4fe1\u606f\u5230\u6570\u636e\u5e93 <br>\r\n         * - vnP_TxnRef\u662f\u60a8\u7684\u8ba2\u5355ID(\u60a8\u6700\u521d\u4f20\u7ed9VNPay\u7684)<br>\r\n         *\/<br>\r\n        <br>\r\n        echo \"Payment Success for order: \".$_GET['vnP_TxnRef'];<br>\r\n    } else {<br>\r\n        \/\/ Payment failed or cancelled by user<br>\r\n        <br>\r\n        \/*<br>\r\n         * TODO:<br>\r\n         * - Update order status to failed\/cancelled in your database  <br>\r\n         *\/<br>\r\n         <br>\r\n       echo \"Payment Failed\/Cancelled\";   <br>\r\n   }<br>\r\n} else {    <br>\r\n   die(\"Invalid signature\");   <br>\r\n}<br>\r\n<\/code><\/pre>\n<h3>IPN\u5904\u7406\u811a\u672c (ipn_listener.php)<\/h3>\n<pre><code class=\"language-php\">&lt;?php  <br>\r\nrequire_once('config.php');  <br>\r\n<br>\r\nfile put contents ('ipn log.txt', print r($_POST true).\"\\n\", FILE APPEND );  <br>\r\n<br>\r\nif (!empty($_POST)) {      <br>\r\n     input Data=$ POST;     <br>\r\n      secure Hash=input Data ['vn p Secure Hash'];     <br>\r\n       unset(input Data ['vn p Secure Hash']);       <br>\r\n       <br>\r\n       ksort(input Data);        <br>\r\n       <br>\r\n       i=0;        <br>\r\n       <br>\r\n       hash Data=\"\";        <br>\r\n        <br>\r\nforeach (input Data as key value){            <br>\r\n     if substr(key04)==\"vn p\"){                <br>\r\n          if strlen(hash Dat a)&gt;0){                    <br>\r\n               hash Dat a.='&amp;'.url encode(key).'='.url encode(value);                <br>\r\n           }else{                    <br>\r\n                hash Dat a.=url encode(key).'='.url encode(value);                <br>\r\n            }            <br>\r\n      }        <br>\r\n}        <br>\r\n<br>\r\ncheck Sum=hash hmac sha512(h ash Da ta secret Key );        <br>\r\n<br>\r\nif check Sum== secure Has h){            <br>\r\n     transaction Id=input Da ta ['vp Txn Ref'];             <br>\r\n      response Code=input Da ta ['vp Response Co de'];              <br>\r\n      <br>\r\n      \/* TODO:                 <br>\r\n         1 Validate the amount matches your expected amount                 <br>\r\n         2 Check this is not duplicate notification                 <br>\r\n         3 Update your database accordingly *\/              <br>\r\n          <br>\r\n           switch(response Co de){ case\"00\": \/* SUCCESS *\/ break ; default : \/* FAILURE *\/ break ; }}else{ http response code(403);\/\/Forbidden exit();}?&gt;<br>\r\n<\/code><\/pre>\n<h2>MoMo\u94b1\u5305\u9ad8\u7ea7\u96c6\u6210\u6280\u5de7<\/h2>\n<h3>Webhook\u9a8c\u8bc1\u793a\u4f8b<\/h3>\n<pre><code class=\"language-php\"> <br>\r\nfunction verify MomoWeb hook(Request request ){    <br>\r\n     partner Code request input('partner Code');    <br>\r\n      access Key request input('access Key');     <br>\r\n       request Id time().\"\";\/\/should match original     <br>\r\n        order Id request input('orderId');      <br>\r\n         <br>\r\namount req uest-&gt;input amoun t));          <br>\r\norder Info urldecode(req uest-&gt;input desc )));           <br>\r\nresponse Time req uest-&gt;input resp onse Time )));           <br>\r\nmessage req uest-&gt;input mes sage )));           <br>\r\ntrans Id req uest-&gt;input transId )));           <br>\r\nerror Cod e re quest -&gt;in put errorCode )) ? :0;           <br>\r\n            <br>\r\nextra D ata \"\";\/\/custom data you passed initially now returned back unchanged                        <br>\r\nraw H ash =\"partnerCode={ partnerCo de}&amp;accessKey={ accessKe y}&amp;requestId={ reques tI d}&amp;amount={ amo unt}&amp;orderId={ ord erI d}\".\"&amp;orderInfo={ orde rIn fo}&amp;responseTime={ res pon seT ime}{ ext raD ata}\";                         <br>\r\n<br>\r\nsignatureFromMomo=req est &gt;i nput sig nature );                         <br>\r\n<br>\r\nourSignature=ha sh hm ac sha256 rawH ash SECRET KEY );                         <br>\r\n<br>\r\nif our Signature!= signature From Momo || errorC ode !=0){<br>\r\nlog info (\"Invalid MoMo webhook received\".json encodereq est all()));<br>\r\nabort(400,\"Bad Request\");}<br>\r\n<br>\r\n\/* Process successful payment here *\/<br>\r\n<br>\r\nreturn response json success truemessage OK ]200 headers Content Type application\/json ];}<br>\r\n<\/code><\/pre>\n<h2>Zalo Pay\u9000\u6b3e\u6d41\u7a0b\u5b9e\u73b0<\/h2>\n<pre><code class=\"language-php\"> <br>\r\nclass ZalopayService{<br>\r\n<br>\r\nconst REFUND ENDPOINT https sb openapi zalopay vn \/vp\/refund ;<br>\r\n<br>\r\npublic static function process Refund(string zp Trans Token long refund Amount string description ){<br>\r\ntimestamp round microtime true)*1000 );<br>\r\n<br>\r\nparams [<br>\r\nappid self APP ID,<br>\r\nzptransid zpTransToken ,<br>\r\namoun t refundAmount ,<br>\r\ndescription substr description fifty ),<br>\r\ntimestamp timestamp ];<br>\r\n<br>\r\nMac=self Compute Mac params );<br>\r\n<br>\r\nparams mac]=Mac;<br>\r\n<br>\r\nresponse Http Helper post self REFUND ENDPOINT params );<br>\r\n<br>\r\nresult json decode response body true );<br>\r\n<br>\r\nif isset result return code])&amp;&amp; result return code]==1){<br>\r\n\/*<br>\r\nTODO:<br>\r\nUpdate your database to reflect refund status*\/<br>\r\nreturn true;}else{<br>\r\nLog error (&quot;ZaloPay refund failed&quot;.print r(resulttrue));<br>\r\nthrow new Exception Failed to process refund with Zalo Pay.);}}<br>\r\n<\/code><\/pre>\n<h2>One Pay\u56fd\u9645\u5361\u652f\u4ed8\u76843D Secure\u96c6\u6210<\/h2>\n<p>\u5bf9\u4e8e\u9700\u89813D\u8ba4\u8bc1\u7684\u4ea4\u6613\uff1a<\/p>\n<pre><code class=\"language-php\"><br>\r\nclass ThreeDSecureHandler {<br>\r\n<br>\r\npublic static function initiateThreeDSecure(array card Details float amount string currency ){<br>\r\none pay Client new One PayInternational();<br>\r\n<br>\r\nauth Response one pay Client create Auth Request card Details amount currency three DSEnabled=&gt;true]);<br>\r\n<br>\r\nthree Ds Method Url auth Response three ds method url ??null;<br>\r\n<br>\r\nthree Ds Server Trans ID auth Response three ds server trans id ??null;<br>\r\n<br>\r\nsession put current payment session [ ...cardDetails ,... authResponse ]);<br>\r\n<br>\r\nredirect Url route checkout.threeds challenge name ]);<br>\r\n<br>\r\nreturn view checkout.threeds initiate compact redirectUrl threeDsMethodUrl threeDsServerTransId amount currency cardDetails lastFour digits]));<br>\r\n<br>\r\n}<br>\r\n<br>\r\npublic static function handle Challenge Completion(Request req ){<br>\r\nsession Get current payment session ;<br>\r\n<br>\r\none pay Client new OnePayInternational();<br>\r\n<br>\r\nfinalize Result one payClient complete Three DS Auth session get threeds server trans id ],req all());<br>\r\n<br>\r\n\/* Verify MAC\/signature etc.*\/<br>\r\n<br>\r\nswitch finalize Result status]){<br>\r\ncase succeeded :<br>\r\nOrder Service mark Paid session get order id ]);<br>\r\nbreak;<br>\r\ndefault:<br>\r\nOrder Service mark Failed(session get order id ]);<br>\r\nthrow new PaymentFailedException();<br>\r\n}}}<br>\r\n<\/code><\/pre>\n<h2>Security Best Practices\u5b89\u5168\u6700\u4f73\u5b9e\u8df5<\/h2>\n<h3>Essential Security Measures:<\/h3>\n<p>1.<strong>Always validate callbacks<\/strong>: Never trust incoming requests without verifying signatures.<\/p>\n<p>2.<strong>Use HTTPS everywhere<\/strong>: Especially for callback URLs and when transmitting sensitive data.<\/p>\n<p>3.<strong>Implement CSRF protection<\/strong>: On pages initiating payments.<\/p>\n<p>4.<strong>Sanitize all inputs<\/strong>: Prevent XSS\/SQL injection attacks.<\/p>\n<p>5.<strong>Log important events<\/strong>: But don\u2019t log full card details or sensitive tokens.<\/p>\n<p>6.<strong>Store minimal data<\/strong>: Don\u2019t store PAN\/CVV after processing completes successfully.<\/p>\n<p>7.Use up-to-date TLS versions(v1.2+).<\/p>\n<p>8.Regularly rotate API keys\/secrets especially after staff changes .<\/p>\n<p>9.Monitor for suspicious activity like multiple failed attempts .<\/p>\n<p>10.Keep PHP and dependencies patched against known vulnerabilities .<\/p>\n<h2>Troubleshooting Common Issues\u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/h2>\n<table>\n<thead>\n<tr>\n<th>Issue\u73b0\u8c61<\/th>\n<th>Possible Causes\u53ef\u80fd\u539f\u56e0<\/th>\n<th>Solutions\u89e3\u51b3\u65b9\u6848<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Invalid\/Missing Signature\u7b7e\u540d\u9519\u8bef<\/td>\n<td>Wrong hashing algorithm\u7b97\u6cd5\u4e0d\u4e00\u81f4<br \/>Parameter ordering issue\u53c2\u6570\u987a\u5e8f\u9519\u8bef<br \/>Encoding problem\u7f16\u7801\u95ee\u9898<\/td>\n<td>Double-check gateway docs\u6587\u6863\u786e\u8ba4<br \/>Ensure exact same parameter ordering\u4e25\u683c\u6309\u5b57\u6bcd\u5e8f<br \/>Test with their sample values\u4f7f\u7528\u6d4b\u8bd5\u6570\u636e\u9a8c\u8bc1<\/td>\n<\/tr>\n<tr>\n<td>Callbacks not received\u672a\u6536\u5230\u56de\u8c03<\/td>\n<td>Firewall blocking\u9632\u706b\u5899\u62e6\u622a<br \/>URL incorrect\u5730\u5740\u9519\u8bef<br \/>Temporary gateway outage\u670d\u52a1\u6682\u65f6\u4e0d\u53ef\u7528<\/td>\n<td>Whitelist gateway IPs\u767d\u540d\u5355\u8bbe\u7f6e<br \/>Verify URL in merchant dashboard\u5546\u6237\u540e\u53f0\u68c0\u67e5 <br \/>Contact support\u8054\u7cfb\u652f\u6301\u56e2\u961f<\/td>\n<\/tr>\n<tr>\n<td>Payments stuck pending\u72b6\u6001\u4e00\u76f4\u5f85\u5904\u7406<\/td>\n<td>Asynchronous processing\u5ef6\u8fdf\u5904\u7406 <br \/>Settlement batch timing\u7ed3\u7b97\u6279\u6b21\u65f6\u95f4\u5dee <br \/>Suspected fraud suspected\u6b3a\u8bc8\u5ba1\u67e5\u4e2d Wait\u5408\u7406\u7b49\u5f85\u65f6\u95f4\u540e\u67e5\u8be2\u4ea4\u6613\u72b6\u6001\u6216\u8054\u7cfb\u5ba2\u670d<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Remember that each Vietnamese payment provider may have specific requirements so always refer to their latest official documentation before going livewith any integration.<\/p>","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u7684\u6307\u5357 \u8981\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u2026<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-2590","post","type-post","status-publish","format-standard","hentry","category-34"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.9 (Yoast SEO v23.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f - DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u56db\u65b9\u652f\u4ed8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.deekpay.com\/zh\/2025\/05\/12\/\u5982\u4f55\u7528php\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\" \/>\n<meta property=\"og:description\" content=\"\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u7684\u6307\u5357 \u8981\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.deekpay.com\/zh\/2025\/05\/12\/\u5982\u4f55\u7528php\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\/\" \/>\n<meta property=\"og:site_name\" content=\"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u56db\u65b9\u652f\u4ed8\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-12T06:26:21+00:00\" \/>\n<meta name=\"author\" content=\"deekpay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"deekpay\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/\"},\"author\":{\"name\":\"deekpay\",\"@id\":\"https:\/\/www.deekpay.com\/#\/schema\/person\/91e4e842fdd04f8c957a9f642506f51d\"},\"headline\":\"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\",\"datePublished\":\"2025-05-12T06:26:21+00:00\",\"dateModified\":\"2025-05-12T06:26:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/\"},\"wordCount\":237,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.deekpay.com\/#organization\"},\"articleSection\":[\"\u8d8a\u5357\u652f\u4ed8\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/\",\"url\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/\",\"name\":\"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f - DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u56db\u65b9\u652f\u4ed8\",\"isPartOf\":{\"@id\":\"https:\/\/www.deekpay.com\/#website\"},\"datePublished\":\"2025-05-12T06:26:21+00:00\",\"dateModified\":\"2025-05-12T06:26:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.deekpay.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.deekpay.com\/#website\",\"url\":\"https:\/\/www.deekpay.com\/\",\"name\":\"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u652f\u4ed8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.deekpay.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.deekpay.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.deekpay.com\/#organization\",\"name\":\"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8\u548cUPI\u652f\u4ed8\u670d\u52a1\u5546\",\"url\":\"https:\/\/www.deekpay.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/www.deekpay.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/deekpay.com\/wp-content\/uploads\/2024\/11\/LOGO-1.png\",\"contentUrl\":\"https:\/\/deekpay.com\/wp-content\/uploads\/2024\/11\/LOGO-1.png\",\"width\":649,\"height\":191,\"caption\":\"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8\u548cUPI\u652f\u4ed8\u670d\u52a1\u5546\"},\"image\":{\"@id\":\"https:\/\/www.deekpay.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.deekpay.com\/#\/schema\/person\/91e4e842fdd04f8c957a9f642506f51d\",\"name\":\"deekpay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/www.deekpay.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/485e931d0b237ba5cfa6c7cea419d88f7e3258b4837d99943e099ff93b458f8c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/485e931d0b237ba5cfa6c7cea419d88f7e3258b4837d99943e099ff93b458f8c?s=96&d=mm&r=g\",\"caption\":\"deekpay\"},\"sameAs\":[\"https:\/\/deekpay.com\"],\"url\":\"https:\/\/www.deekpay.com\/zh\/author\/deekpay\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f - DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u56db\u65b9\u652f\u4ed8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.deekpay.com\/zh\/2025\/05\/12\/\u5982\u4f55\u7528php\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\/","og_locale":"zh_TW","og_type":"article","og_title":"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f","og_description":"\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\u7684\u6307\u5357 \u8981\u4f7f\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51&hellip;","og_url":"https:\/\/www.deekpay.com\/zh\/2025\/05\/12\/\u5982\u4f55\u7528php\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f\/","og_site_name":"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u56db\u65b9\u652f\u4ed8","article_published_time":"2025-05-12T06:26:21+00:00","author":"deekpay","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"deekpay","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"9 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#article","isPartOf":{"@id":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/"},"author":{"name":"deekpay","@id":"https:\/\/www.deekpay.com\/#\/schema\/person\/91e4e842fdd04f8c957a9f642506f51d"},"headline":"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f","datePublished":"2025-05-12T06:26:21+00:00","dateModified":"2025-05-12T06:26:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/"},"wordCount":237,"commentCount":0,"publisher":{"@id":"https:\/\/www.deekpay.com\/#organization"},"articleSection":["\u8d8a\u5357\u652f\u4ed8"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/","url":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/","name":"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f - DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u56db\u65b9\u652f\u4ed8","isPartOf":{"@id":"https:\/\/www.deekpay.com\/#website"},"datePublished":"2025-05-12T06:26:21+00:00","dateModified":"2025-05-12T06:26:21+00:00","breadcrumb":{"@id":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.deekpay.com\/en\/2025\/05\/12\/%e5%a6%82%e4%bd%95%e7%94%a8php%e6%8e%a5%e5%85%a5%e8%b6%8a%e5%8d%97%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%ef%bc%9f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.deekpay.com\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u7528PHP\u63a5\u5165\u8d8a\u5357\u652f\u4ed8\u7f51\u5173\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.deekpay.com\/#website","url":"https:\/\/www.deekpay.com\/","name":"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8|\u5370\u5ea6UPI\u652f\u4ed8|\u5370\u5ea6\u4e09\u65b9\u652f\u4ed8","description":"","publisher":{"@id":"https:\/\/www.deekpay.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.deekpay.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/www.deekpay.com\/#organization","name":"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8\u548cUPI\u652f\u4ed8\u670d\u52a1\u5546","url":"https:\/\/www.deekpay.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.deekpay.com\/#\/schema\/logo\/image\/","url":"https:\/\/deekpay.com\/wp-content\/uploads\/2024\/11\/LOGO-1.png","contentUrl":"https:\/\/deekpay.com\/wp-content\/uploads\/2024\/11\/LOGO-1.png","width":649,"height":191,"caption":"DEEKPAY-\u5370\u5ea6\u539f\u751f\u652f\u4ed8\u548cUPI\u652f\u4ed8\u670d\u52a1\u5546"},"image":{"@id":"https:\/\/www.deekpay.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.deekpay.com\/#\/schema\/person\/91e4e842fdd04f8c957a9f642506f51d","name":"deekpay","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.deekpay.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/485e931d0b237ba5cfa6c7cea419d88f7e3258b4837d99943e099ff93b458f8c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/485e931d0b237ba5cfa6c7cea419d88f7e3258b4837d99943e099ff93b458f8c?s=96&d=mm&r=g","caption":"deekpay"},"sameAs":["https:\/\/deekpay.com"],"url":"https:\/\/www.deekpay.com\/zh\/author\/deekpay\/"}]}},"_links":{"self":[{"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/posts\/2590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/comments?post=2590"}],"version-history":[{"count":1,"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/posts\/2590\/revisions"}],"predecessor-version":[{"id":2591,"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/posts\/2590\/revisions\/2591"}],"wp:attachment":[{"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/media?parent=2590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/categories?post=2590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deekpay.com\/zh\/wp-json\/wp\/v2\/tags?post=2590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}