{"id":3146,"date":"2025-06-02T13:31:44","date_gmt":"2025-06-02T05:31:44","guid":{"rendered":"https:\/\/www.deekpay.com\/?p=3146"},"modified":"2025-06-02T13:31:44","modified_gmt":"2025-06-02T05:31:44","slug":"%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.deekpay.com\/en\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/","title":{"rendered":"PHP access to Thailand's payment gateway example tutorials"},"content":{"rendered":"<p># PHP Access to Thailand Payment Gateway Tutorial Example<\/p>\n<p> 1. Preparatory work<\/p>\n<p>Before you start, you need to:<br \/>\n- A merchant account with a Thai payment gateway (e.g. 2C2P, Omise, TrueMoney, etc.)<br \/>\n- PHP development environment (PHP 7.0+ recommended)<br \/>\n- Composer Dependency Management Tool<br \/>\n- Web server (Apache\/Nginx)<\/p>\n<p> 2. Installation of necessary libraries<\/p>\n<p>\"`bash<br \/>\ncomposer require guzzlehttp\/guzzle<br \/>\n&#8220;`<\/p>\n<p> 3. Omise Payment Gateway Integration Example<\/p>\n<p> a) Omise initialisation configuration<\/p>\n<p>\"`php<br \/>\n<?php\nrequire 'vendor\/autoload.php';\n\nuse GuzzleHttp\\Client;\n\nclass OmisePayment {\n    private $publicKey = 'your_omise_public_key';\n    private $secretKey = 'your_omise_secret_key';\n    private $apiUrl = 'https:\/\/api.omise.co';\n    \n    public function __construct() {\n        $this->client = new Client([<br \/>\n            'base_uri' =&gt; $this-&gt;apiUrl,<br \/>\n            'auth' =&gt; [$this-&gt;secretKey, \"]<br \/>\n        ]);<br \/>\n    }<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p> b) Create payment requests<\/p>\n<p>\"`php<br \/>\npublic function createCharge($amount, $currency, $token) {<br \/>\n    try {<br \/>\n        $response = $this-&gt;client-&gt;post('\/charges', [<br \/>\n            'form_params' =&gt; [<br \/>\n                'amount' =&gt; intval($amount * 100), \/\/ Omise uses the smallest currency unit (cents)<br \/>\n                'currency' =&gt; strtolower($currency),<br \/>\n                'card' =&gt; $token.<br \/>\n                \/\/ Thailand specific parameters if needed<br \/>\n                \/\/ &#8230;<br \/>\n            ]<br \/>\n        ]);<\/p>\n<p>        return json_decode($response-&gt;getBody(), true);<\/p>\n<p>    } catch (Exception $e) {<br \/>\n        error_log('Omise charge error: '.$e-&gt;getMessage());<br \/>\n        return ['error' =&gt; true];<br \/>\n    }<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p> c) Token Generation Front-end Code Example (JavaScript)<\/p>\n<p>\"`javascript<br \/>\n\/\/ After introducing the Omise.js library in HTML.<\/p>\n<p>&#8220;`<\/p>\n<p> 4. Example of TrueMoney Wallet integration<\/p>\n<p> a) API Configuration Classes<\/p>\n<p>\"`php<br \/>\nclass TrueMoneyWalletPayment {<br \/>\n   private const BASE_URL_SANDBOX = \"https:\/\/sandbox.truemoney.com\/api\/v1\u2033;<br \/>\n   private const BASE_URL_PRODUCTION = \"https:\/\/tmn-prod.apigee.net\/api\/v1\";<\/p>\n<p>   public function __construct(private string|bool|null $_isSandbox=true){}<\/p>\n<p>   protected function getBaseURL():string{<br \/>\n       return ($this-&gt;_isSandbox)?self::BASE_URL_SANDBOX:self::BASE_URL_PRODUCTION;<br \/>\n   }<\/p>\n<p>   protected static array $_headers=[<br \/>\n       \"Content-Type\"=&gt;\"application\/json\".<br \/>\n       \"Accept\"=&gt;\"application\/json\"<br \/>\n   ];<\/p>\n<p>   public static array $_requiredFields=[\"username\", \"password\"];<\/p>\n<p>}<br \/>\n&#8220;`<\/p>\n<p> b) QR Code Payment Processing Flow <\/p>\n<p>\"`php<br \/>\n\/<br \/>\n* @param float|int|string amount - payment amount in THB (\u0e3f)<br \/>\n* @param string merchantRef - unique reference ID for transaction tracking<br \/>\n*\/<br \/>\npublic static async generateQRCode(<br \/>\n float|int|string amount=null ,<br \/>\n string merchantRef=\"\" ,<br \/>\n bool isSandBox=false):array{<\/p>\n<p> try{<\/p>\n<p>     # Validate required fields and amounts...<\/p>\n<p>     # Prepare request data for TrueMoney API<br \/>\n     $_requestData=[<br \/>\n          \"paymentAmount\"=&gt;floatval(number_format(floatval(str_replace(\",\",\" \",$amount)),2,\".\" , \"\")),<br \/>\n          \"merchantReferenceId\"=&gt;strtoupper(substr(preg_replace(\"\/[^A-Za-z0-9]+\/i \",\"\",trim((empty($_merchantReference))?uniqid():$_merchantReference)),0 ,20)),<br \/>\n          ... # other required params per TMN docs<br \/>\n     ];<\/p>\n<p>}catch(\\Throwable|\\Exception|\\ErrorException$exception){<br \/>\n throw new \\RuntimeException(sprintf(\"%s:%s \",__METHOD__,$exception));;<br \/>\n}<\/p>\n<p>return [];<br \/>\n}<br \/>\n&#8220;`<br \/>\nNote: For actual implementation, please refer to the latest TrueMoney API documentation.<\/p>\n<p>5 . Solving common problems  <\/p>\n<p>Q: SSL certificate validation failed?<br \/>\nA: `curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);` (test environment only)<\/p>\n<p>Q: HTTP response status code 403?<br \/>\nA: IP whitelist is not set or API key is invalid. Check the merchant backend IP restriction settings.<\/p>\n<p>&#8212;<\/p>\n<p>The above is the basic framework of PHP access to the mainstream payment gateways in Thailand. Please be sure to implement it exactly:<\/p>\n<p>1. Carefully read the latest official documentation of the selected gateway.<br \/>\n2. Enabling HTTPS and strict data validation in production environments<br \/>\n3. Consider adding logs to record all transaction requests and responses<\/p>\n<p>Depending on your business needs, you may also need to process refunds, check transaction status, and other functions.<\/p>\n<h1>PHP access to Thailand payment gateway example tutorial (continued)<\/h1>\n<h2>6. 2C2P Payment Gateway Integration Example<\/h2>\n<h3>a) Initialising the configuration<\/h3>\n<pre><code class=\"language-php\">class Payment2C2P {<br>\r\n    private $merchantID = 'your_merchant_id';<br>\r\n    private $secretKey = 'your_secret_key';<br>\r\n    private $apiUrl = 'https:\/\/demo2.2c2p.com\/'; \/\/ Sandbox URL<br>\r\n    <br>\r\n    public function __construct() {<br>\r\n        $this-&gt;client = new Client([)<br>\r\n            'base_uri' =&gt; $this-&gt;apiUrl,<br>\r\n            'headers' =&gt; [<br>\r\n                'Content-Type' =&gt; 'application\/json',<br>\r\n                'Accept' =&gt; 'application\/json'<br>\r\n            ]<br>\r\n        ]);<br>\r\n    }<br>\r\n}<br>\r\n<\/code><\/pre>\n<h3>b) Create payment requests<\/h3>\n<pre><code class=\"language-php\">public function createPayment($orderId, $amount, $currency, array $customerInfo) {<br>\r\n    try {<br>\r\n        \/\/ Prepare payload according to 2C2P API specs<br>\r\n        $payload = [<br>\r\n            &quot;merchantID&quot; =&gt; $this-&gt;merchantID,<br>\r\n            &quot;invoiceNo&quot; =&gt; str_pad($orderId, 12, &quot;0&quot;, STR_PAD_LEFT),<br>\r\n            &quot;description&quot; =&gt; &quot;Order Payment&quot;,<br>\r\n            &quot;amount&quot; =&gt; number_format($amount, 2),<br>\r\n            &quot;currencyCode&quot; =&gt; ($currency === &quot;THB&quot;) ? &quot;764&quot; : &quot;&quot;, \/\/ ISO numeric code for THB is 764<br>\r\n            \/\/ Thailand specific parameters:<br>\r\n            &quot;paymentChannel&quot; =&gt; [&quot;CC&quot;, &quot;&quot;], \/\/ Credit Card and other available channels in Thailand<br>\r\n            ...$customerInfo,<br>\r\n        ];<br>\r\n        <br>\r\n        \/\/ Generate HMAC signature as required by 2C2P<br>\r\n        ksort($payload);<br>\r\n        foreach ($payload as &amp;$value) {<br>\r\n           if (is_array($value)) continue;<br>\r\n           if (is_bool($value)) { <br>\r\n               continue; <br>\r\n           } else { <br>\r\n               trim((string)$value); <br>\r\n           }<br>\r\n         }<br>\r\n<br>\r\n         $_signatureData=implode(&quot;&quot;,array_values(array_filter($_requestPayload)));<br>\r\n         <br>\r\n         $_hashSignature=hash_hmac('sha256',$_signatureData,$this-&gt;_secretKey);<br>\r\n<br>\r\n          $_requestPayload['signature']=$_hashSignature;<br>\r\n<br>\r\n          return json_encode($_requestPayload);<br>\r\n<br>\r\n      } catch (\\Exception|\\Throwable$exception){<br>\r\n          throw new \\RuntimeException(sprintf(&quot;%s:%s &quot;,__METHOD__,$exception));<br>\r\n      }<br>\r\n   }<br>\r\n<br>\r\n   \/<br>\r\n   * @param string|int orderId - unique identifier for transaction  <br>\r\n   *\/<br>\r\n   public static async verifyTransaction(string|int$_orderReference=&quot;&quot;):bool{<br>\r\n       # Implementation per API docs...<br>\r\n       return false;<br>\r\n   }<br>\r\n<\/code><\/pre>\n<p>7 . Handling callback notifications<\/p>\n<p>Most Thai payment gateways send server-to-server (SERVER-to-SERVER\/S-TO-S) notifications:<\/p>\n<pre><code class=\"language-php\"><br>\r\n\/<br>\r\n* :: Example callback handler for Omise webhook notifications  <br>\r\n*\/<br>\r\nfunction handleOmiseWebhook(){<br>\r\n    <br>\r\n     file_put_contents(__DIR__.\" \/... \/logs\/webhooks.log\",<br>\r\n                      sprintf(\"[%s] %s\\n\",<br>\r\n                              date(\"Y-m-d H:i:s\"),<br>\r\n                              print_r($_POST?????????????????????????????? [],true)),<br>\r\n                      FILE_APPEND).<br>\r\n     <br>\r\n     try{   <br>\r\n          <br>\r\n          if(!isset($_SERVER[\"HTTP_X_SIGNATURE\"])){<br>\r\n              throw new \\InvalidArgumentException(\"Missing X-Signature header\");;<br>\r\n          }<br>\r\n<br>\r\n          list(\/*algo*\/,\/*timestamp*\/,$expectedSig)=explode(\",\",trim(str_replace([\"v1=\", \"t=\"],\"\",$_SERVER[\"HTTP_X_SIGNATURE\"]));<br>\r\n<br>\r\n          <br>\r\n         \/* Verify the signature using your endpoint secret *\/       <br>\r\n         \/* See: https:\/\/www.omise.co\/webhook-signatures *\/<br>\r\n<br>\r\n         <br>\r\n     }catch(\\Throwable|\\Exception$e){<br>\r\n         <br>\r\n         http_response_code(400).<br>\r\n         <br>\r\n     } finally{<br>\r\n        <br>\r\n       exit();\/\/ Always terminate script after handling webhooks!<br>\r\n       <br>\r\n     }<br>\r\n}<br>\r\n<br>\r\n<\/code><\/pre>\n<p>8 . Security Best Practices<\/p>\n<p>1.<strong>Data validation<\/strong>:<\/p>\n<pre><code class=\"language-php\"><br>\r\nfunction sanitizeThaiInput(string|null$_input=\"\"):?string{<br>\r\n<br>\r\n      if(is_null($_input))return null;<br>\r\n<br>\r\n      $_cleaned=preg_replace(\"\/[^\u0e01-\u0e59\\w\\-\\. @ ]+\/u\",\"\".<br>\r\n<br>\r\n                  strip_tags(<br>\r\n<br>\r\n                     htmlspecialchars_decode(<br>\r\n<br>\r\n                        filter_var(trim((string)$input),<br>\r\n<br>\r\n                                   FILTER_UNSAFE_Raw.<br>\r\n<br>\r\n                                   [\"flags\"=&gt;FILTER_FLAG_NO_ENCODE_QUTES])<br>\r\n<br>\r\n                     )<br>\r\n<br>\r\n                   ));<br>\r\n<br>\r\n       return (!empty(_cleaned)?mb_substr(_cleaneded,,255):null;<br>\r\n<br>\r\n}<br>\r\n<\/code><\/pre>\n<hr>\n<p>9 . Testing and debugging techniques<\/p>\n<p><strong>Analogue Response Tool<\/strong>:<br \/>\nExpose your local development environment to the Internet to receive webhooks using tools such as Ngrok.<\/p>\n<p><strong>Logging recommendations<\/strong>:<\/p>\n<pre><code class=\"language-ini\">; php.ini settings for payment logging.<br>\r\nlog_errors=On  <br>\r\nerror_log=\"\/var\/log\/php\/payment_error.log\"<br>\r\n<\/code><\/pre>\n<hr>\n<p>10 . Extended functionality implementation<\/p>\n<p>a) Instalments (for Thai credit cards).<\/p>\n<p>Add parameters to Omise or other APIs that support staging:<\/p>\n<pre><code class=\"language-json\">{\"installment_term\":3}   <br>\r\n<\/code><\/pre>\n<p>b) PromptPay QR code generation.<\/p>\n<pre><code class=\"language-bash\">composer require endroid\/qr-code    <br>\r\n<\/code><\/pre>\n<p>Then generate a QR code containing the PromptPay URI:<\/p>\n<pre><code class=\"language-php\">use Endroid\\QrCode\\QrCode;     <br>\r\nuse Endroid\\QrCode\\Writer\\PngWriter;      <br>\r\n     <br>\r\nfunction generatePromptPayQR(float$amount,int|string$target){      <br>\r\n     <br>\r\n    \/ Format per Thai banking standards *\/     <br>\r\n    promptpayUri=sprintf(&quot;00020101021129370016A000000677010111%s530376454%02d%s6304%s&quot;,...);      <br>\r\n          <br>\r\n     qrcode=new Qrcode(promptpayUri);            <br>\r\n          <br>\r\n     writer=new PngWriter();            <br>\r\n          <br>\r\n     result=$writer-&gt;write(qrcodE);            <br>\r\n<br>\r\n            header (\"Content-Type:\"\".result-&gt;getMimeType().\"\"\") ;             <br>\r\n<br>\r\n             echo result-getString(); exit();                 <br>\r\n<br>\r\n}                <br>\r\n<\/code><\/pre>\n<hr>\n<p>We hope this step-by-step guide will help you get your Thai payment integration up and running smoothly! Remember to conduct thorough sandbox testing before production deployment and consider hiring a professional Thai technical translator to check all user-facing prompts.<\/p>","protected":false},"excerpt":{"rendered":"<p># PHP Access to Thailand Payment Gateway Example Tutorial 1. Preparation At the beginning of...<\/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":[31],"tags":[],"class_list":["post-3146","post","type-post","status-publish","format-standard","hentry","category-31"],"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>\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b - 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\/en\/2025\/06\/02\/\u7528php\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\" \/>\n<meta property=\"og:description\" content=\"# PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u5b9e\u4f8b\u6559\u7a0b 1. \u51c6\u5907\u5de5\u4f5c \u5728\u5f00\u59cb\u4e4b&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.deekpay.com\/en\/2025\/06\/02\/\u7528php\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\/\" \/>\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-06-02T05:31:44+00:00\" \/>\n<meta name=\"author\" content=\"deekpay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"deekpay\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/\"},\"author\":{\"name\":\"deekpay\",\"@id\":\"https:\/\/www.deekpay.com\/#\/schema\/person\/91e4e842fdd04f8c957a9f642506f51d\"},\"headline\":\"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\",\"datePublished\":\"2025-06-02T05:31:44+00:00\",\"dateModified\":\"2025-06-02T05:31:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/\"},\"wordCount\":25,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.deekpay.com\/#organization\"},\"articleSection\":[\"\u6cf0\u56fd\u652f\u4ed8\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/\",\"url\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/\",\"name\":\"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b - 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-06-02T05:31:44+00:00\",\"dateModified\":\"2025-06-02T05:31:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.deekpay.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\"}]},{\"@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\":\"en-GB\"},{\"@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\":\"en-GB\",\"@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\":\"en-GB\",\"@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\/en\/author\/deekpay\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b - 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\/en\/2025\/06\/02\/\u7528php\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\/","og_locale":"en_GB","og_type":"article","og_title":"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b","og_description":"# PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u5b9e\u4f8b\u6559\u7a0b 1. \u51c6\u5907\u5de5\u4f5c \u5728\u5f00\u59cb\u4e4b&hellip;","og_url":"https:\/\/www.deekpay.com\/en\/2025\/06\/02\/\u7528php\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b\/","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-06-02T05:31:44+00:00","author":"deekpay","twitter_card":"summary_large_image","twitter_misc":{"Written by":"deekpay"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#article","isPartOf":{"@id":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/"},"author":{"name":"deekpay","@id":"https:\/\/www.deekpay.com\/#\/schema\/person\/91e4e842fdd04f8c957a9f642506f51d"},"headline":"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b","datePublished":"2025-06-02T05:31:44+00:00","dateModified":"2025-06-02T05:31:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/"},"wordCount":25,"commentCount":0,"publisher":{"@id":"https:\/\/www.deekpay.com\/#organization"},"articleSection":["\u6cf0\u56fd\u652f\u4ed8"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/","url":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/","name":"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b - 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-06-02T05:31:44+00:00","dateModified":"2025-06-02T05:31:44+00:00","breadcrumb":{"@id":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.deekpay.com\/2025\/06\/02\/%e7%94%a8php%e6%8e%a5%e5%85%a5%e6%b3%b0%e5%9b%bd%e6%94%af%e4%bb%98%e7%bd%91%e5%85%b3%e7%9a%84%e5%ae%9e%e4%be%8b%e6%95%99%e7%a8%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.deekpay.com\/"},{"@type":"ListItem","position":2,"name":"\u7528PHP\u63a5\u5165\u6cf0\u56fd\u652f\u4ed8\u7f51\u5173\u7684\u5b9e\u4f8b\u6559\u7a0b"}]},{"@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":"en-GB"},{"@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":"en-GB","@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":"en-GB","@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\/en\/author\/deekpay\/"}]}},"_links":{"self":[{"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/posts\/3146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/comments?post=3146"}],"version-history":[{"count":1,"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/posts\/3146\/revisions"}],"predecessor-version":[{"id":3149,"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/posts\/3146\/revisions\/3149"}],"wp:attachment":[{"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/media?parent=3146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/categories?post=3146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deekpay.com\/en\/wp-json\/wp\/v2\/tags?post=3146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}