ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์Programmingจนปัญญาแล้ว รบกวนท่านมีเคยทำ ระบบเติมเงิน Tmtopup ช่วยทีครับ
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: จนปัญญาแล้ว รบกวนท่านมีเคยทำ ระบบเติมเงิน Tmtopup ช่วยทีครับ  (อ่าน 4437 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
$100perday
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 324
ออฟไลน์ ออฟไลน์

กระทู้: 2,032



ดูรายละเอียด
« เมื่อ: 22 กันยายน 2012, 23:08:54 »

หน้า login
โค๊ด:
<html>
<head>
<title>เติมเงิน</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<table width="625" border="0" align="center" cellpadding="1" cellspacing="1">
  <form method="post" action="tmrequest.php"><tr>
    <td width="124"><font size="2">รหัสบัตร 14 หลัก</font></td>
    <td width="356"><input name="truemoney_password" type="text" size=50 maxlength="14"><input type="hidden" name="usermem" value="peter"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" value="เติมเงิน"></td>
  </tr></form>
</table>
</body>
</html>

หน้า tmrequest.php
โค๊ด:
<?php
$truemoney_password 
$_POST[truemoney_password];
function 
tmn_refill ($truemoney_password)
{
if(
function_exists(&#39;curl_init&#39;))
{
$curl 
curl_init(&#39;[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);
curl_setopt($curlCURLOPT_TIMEOUT10);
curl_setopt($curlCURLOPT_HEADERFALSE);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
$curl_content curl_exec($curl);
curl_close($curl);
}
else
{
$curl_content file_get_contents(&#39;[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);
}
if(
strpos($curl_content,&#39;SUCCEED&#39;) !== FALSE)
{
return 
true;
}
else
{
return 
false;
}
}
?>


หน้า tmpay_result

โค๊ด:
<?php
require_once "connectdb.php";
$transaction_id $_GET[‘transaction_id’];
$password $_GET[‘password’];
$amount  $_GET[‘amount’];
$status $_GET[‘status’];
$usermem $_GET[usermem]
     
    if( 
$status === 
{
$sql_update"update member set status = &#39;$status&#39;,point = &#39;$amount&#39; where usermem = &#39;$usermem&#39;";
mysql_query($sql_update);
echo 
"SUCCEED"

}
   else 
    {
         
/* ไม่สามารถเติมเงินได ้  */
        
die(‘ERROR|ANY_REASONS’);
    }
?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>

</body>
</html>


มันขึ้น error ว่า

Parse error: syntax error, unexpected T_STRING in /home/vdogirl/domains/xxxxxx.com/public_html/vdo/tmrequest.php on line 19

หาเท่าไหร่ก็ไม่เจอครับ ว่าผิด syntax ตรงไหน

รบกวนผู้รู้ช่วยดูทีครับ
 wanwan017
บันทึกการเข้า

เหนื่อย..
9wong
ก๊วนเสียว
*

พลังน้ำใจ: 35
ออฟไลน์ ออฟไลน์

กระทู้: 234



ดูรายละเอียด
« ตอบ #1 เมื่อ: 22 กันยายน 2012, 23:29:55 »

ผมใช้ tmtopup.com ครับ ง่ายกว่า tmpay.net ทั้ง 2 เจ้าเป็นเจ้าเดียวกัน

ลองลบ [url ][/url]  ออกสิครับ
โค๊ด:
curl_init('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);
« แก้ไขครั้งสุดท้าย: 22 กันยายน 2012, 23:30:32 โดย 9wong » บันทึกการเข้า
system-4x
ก๊วนเสียว
*

พลังน้ำใจ: 16
ออฟไลน์ ออฟไลน์

กระทู้: 259



ดูรายละเอียด เว็บไซต์
« ตอบ #2 เมื่อ: 23 กันยายน 2012, 00:09:34 »

หน้า tmrequest.php

โค๊ด:
curl_init('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);

โค๊ด:
curl_init('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);

ลองเปลี่ยนตรง mywebsite เป็น ชื่อ domain ท่านสิครับ

ถ้าไม่ได้ก็ลองงมๆดู code เอานะครับ ผมก็มั่ว  wanwan012
บันทึกการเข้า

MeenyFancy
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 208
ออฟไลน์ ออฟไลน์

กระทู้: 1,270



ดูรายละเอียด
« ตอบ #3 เมื่อ: 23 กันยายน 2012, 11:09:29 »

ผิดที่เครื่องหมาย Single quote ที่บรรทัดที่ 8 กับ 19 ครับ
มันไม่ใช่ Single quote มันเป็น  back quote

ถ้าไม่เข้าใจพี่ผมพิมพ์ ก็พิมเครื่องหมาย ' ลงไปเอง อย่าก๊อบมา

เพิ่มอีกนิด เวลาแก้ไขไฟล์ php ให้ใช้โปรแกรมที่สามารถแสดงสีของ syntax ได้ครับ เช่น editplus
แต่จริงๆ ที่คุณก๊อบมาลงใน [ code] ก็พอรู้แล้วนะว่า syntax มันผิด เพราะสีมันแสดงไม่ถูกครับ

ดูโค้ดที่ผมเอามาลง ดูผิวเผินก็เหมือนกันเด๊ะๆ แต่ทำไมใช้ได้หละ Smiley

โค๊ด:
<?php
$truemoney_password 
$_POST[truemoney_password];
function 
tmn_refill ($truemoney_password)
{
if(
function_exists(&#39;curl_init&#39;))
{
$curl 
curl_init(&#39;[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php&#39;);
curl_setopt($curlCURLOPT_TIMEOUT10);
curl_setopt($curlCURLOPT_HEADERFALSE);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
$curl_content curl_exec($curl);
curl_close($curl);
}
else
{
$curl_content file_get_contents(&#39;[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php&#39;);
}
if(
strpos($curl_content,&#39;SUCCEED&#39;) !== FALSE)
{
return 
true;
}
else
{
return 
false;
}
}
?>

« แก้ไขครั้งสุดท้าย: 23 กันยายน 2012, 11:11:51 โดย MeenyFancy » บันทึกการเข้า

top18753
เจ้าพ่อบอร์ดเสียว
*

พลังน้ำใจ: 260
ออฟไลน์ ออฟไลน์

กระทู้: 3,682



ดูรายละเอียด
« ตอบ #4 เมื่อ: 23 กันยายน 2012, 11:29:53 »

ใจคับ
บันทึกการเข้า


  
ปิดรับบริการ ชั่วคราว อย่างไม่มีกำหนดนะครับ
$100perday
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 324
ออฟไลน์ ออฟไลน์

กระทู้: 2,032



ดูรายละเอียด
« ตอบ #5 เมื่อ: 23 กันยายน 2012, 12:53:28 »

ขอบคุณทุกท่านมากครับ  wanwan017
บันทึกการเข้า

เหนื่อย..
NooNaamz
คนรักเสียว
*

พลังน้ำใจ: 12
ออฟไลน์ ออฟไลน์

กระทู้: 150



ดูรายละเอียด
« ตอบ #6 เมื่อ: 23 กันยายน 2012, 14:28:23 »

ผิดที่เครื่องหมาย Single quote ที่บรรทัดที่ 8 กับ 19 ครับ
มันไม่ใช่ Single quote มันเป็น  back quote

ถ้าไม่เข้าใจพี่ผมพิมพ์ ก็พิมเครื่องหมาย ' ลงไปเอง อย่าก๊อบมา

เพิ่มอีกนิด เวลาแก้ไขไฟล์ php ให้ใช้โปรแกรมที่สามารถแสดงสีของ syntax ได้ครับ เช่น editplus
แต่จริงๆ ที่คุณก๊อบมาลงใน [ code] ก็พอรู้แล้วนะว่า syntax มันผิด เพราะสีมันแสดงไม่ถูกครับ

ดูโค้ดที่ผมเอามาลง ดูผิวเผินก็เหมือนกันเด๊ะๆ แต่ทำไมใช้ได้หละ Smiley

โค๊ด:
<?php
$truemoney_password 
$_POST[truemoney_password];
function 
tmn_refill ($truemoney_password)
{
if(
function_exists(&#39;curl_init&#39;))
{
$curl 
curl_init(&#39;[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php&#39;);
curl_setopt($curlCURLOPT_TIMEOUT10);
curl_setopt($curlCURLOPT_HEADERFALSE);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
$curl_content curl_exec($curl);
curl_close($curl);
}
else
{
$curl_content file_get_contents(&#39;[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php&#39;);
}
if(
strpos($curl_content,&#39;SUCCEED&#39;) !== FALSE)
{
return 
true;
}
else
{
return 
false;
}
}
?>


ยอดฝีมือจริงๆ คร่ะ
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์