Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7401427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:27:55+00:00 2026-05-29T04:27:55+00:00

I wrote a payment module for X-Cart. My return url section is: require ‘./auth.php’;

  • 0

I wrote a payment module for X-Cart.
My return url section is:

require './auth.php';

if (!func_is_active_payment('cc_mellat.php'))
    exit;

$rescode=$_POST['ResCode'];
$RefID=$_POST['RefId'];
$saleOrderId=$_POST['saleOrderId'];
$SaleReferenceId=$_POST['SaleReferenceId'];

$tmp = func_query_first("SELECT sessionid,param1 FROM $sql_tbl[cc_pp3_data] WHERE ref='".$saleOrderId."'");
$bill_output['sessid'] = $tmp['sessionid'];

$bill_output['billmes']="RefId:".$RefId." - ResCode: ".$rescode." - SaleReferenceId:".$SaleReferenceId;
// Approved
if ($rescode == 0 && $is_md5) {
    $bill_output['code'] = 1;       
// Declined
} else {
    echo "Error: ".$rescode;
    $bill_output['code'] = 2;       
}
var_dump($bill_output); 

require($xcart_dir.'/payment/payment_ccend.php');

but after payment X-Cart says:

Order declined.
Review your data or contact the store administrator.

Reason: Error: Your order was lost 

What is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:27:56+00:00Added an answer on May 29, 2026 at 4:27 am

    It seems you use undefined variable $is_md5 here:

    if ($rescode == 0 && $is_md5) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add a new payment module into Magento. However, even after
I am working on a new payment module for Magento and have come across
Ok this is sort of hard to explain but basically i wrote a PHP
I'm trying to write a custom payment gateway for Magento. The module is recognised
I wrote a small shopping cart in .Net that sends someone to PayPal upon
I am developing a payment module. I don't find proper documentation anywhere for Magento
I am developing a payment Module for Magento. I did this using this tutorial
Wrote the following in PowersHell as a quick iTunes demonstration: $iTunes = New-Object -ComObject
Wrote a quick Java proggy to spawn 10 threads with each priority and calculate
I wrote a simple batch file as a PowerShell script, and I am getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.