Reseller Club And Custom Payment Gateway Callback Undefined index

Known:

  • My Client Has Reseller Club WebStore (resellerclub.com)
  • All PHP Code from Reseller Club (paymentpage.php, postpayment.php) already applied in Client Server
  • He used duitku (www.duitku.com) as payment gateway

Sample Order:

I order one domain name and status order is On Hold like image below:

Problem:

After i pay with duitku sandbox like image below:

Then Payment not Success

The Error Log:

[02-Feb-2020 00:27:04 Etc/GMT] PHP Notice:  Undefined index: redirecturl in /home/a2fahmi/public_html/duitku/postpayment.php on line 18
[02-Feb-2020 00:27:04 Etc/GMT] PHP Notice:  Undefined index: transid in /home/a2fahmi/public_html/duitku/postpayment.php on line 19
[02-Feb-2020 00:27:04 Etc/GMT] PHP Notice:  Undefined index: sellingcurrencyamount in /home/a2fahmi/public_html/duitku/postpayment.php on line 20
[02-Feb-2020 00:27:04 Etc/GMT] PHP Notice:  Undefined index: accountingcurencyamount in /home/a2fahmi/public_html/duitku/postpayment.php on line 21
[02-Feb-2020 00:27:04 Etc/GMT] PHP Notice:  Undefined index: status in /home/a2fahmi/public_html/duitku/postpayment.php on line 24

Explain:

Above error is caused by these below code:

$redirectUrl = $_SESSION['redirecturl']; 
$transId = $_SESSION['transid'];	
$sellingCurrencyAmount = $_SESSION['sellingcurrencyamount'];
$accountingCurrencyAmount = $_SESSION['accountingcurencyamount'];
$status = $_REQUEST["status"]

Question:

How to get my order to success … ?

Answer:

I remove the session and get the data from variable that payment gateway returned

Next Problem:

The payment data had to be redirected to Reseller Club

Question:

How redirect the data … ?

Answer:

Use this code

header("Location:".$redirectUrl."?transid=".$transId."&status=".$status."&rkey=".$rkey."&checksum=".$checksum."&sellingamount=".$sellingCurrencyAmount."&accountingamount=".$accountingCurrencyAmount);

Result:

See the order status, it should be change like this

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *