Jump to content

Problem with CCNow Modules


Guest

Recommended Posts

I have problem with my CCNow Modules, when processing payment from cubecart to CCNow server, error 5 "missing x_amount", does anyone can solve this?

Thank You.

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
  • 8 months later...
  • 2 weeks later...

I have problem with my CCNow Modules, when processing payment from cubecart to CCNow server, error 5 "missing x_amount", does anyone can solve this?

Thank You.

////////////////////////////////////////////////////////

*/

$module = fetchDbConfig("ccNow");

function repeatVars(){

global $i, $orderInv;

$hiddenVars = "<input type='hidden' name='x_product_sku_".$i."' value='".$orderInv['productCode']."' />

<input type='hidden' name='x_product_title_".$i."' value='".$orderInv['name']."' />

<input type='hidden' name='x_product_quantity_".$i."' value='".$orderInv['quantity']."' />

<input type='hidden' name='x_product_unitprice_".$i."' value='".sprintf("%.2f",$orderInv['price']/$orderInv['quantity'])."' />

<input type='hidden' name='x_product_url_".$i."' value='".$GLOBALS['storeURL']."/index.php?_a=viewProd&productId=".$orderInv['productId']."' />";

return $hiddenVars;

}

function fixedVars(){

global $module, $basket, $ccUserData, $cart_order_id, $config, $GLOBALS;

$hiddenVars = "<input type='hidden' name='x_login' value='".$module['acName']."' />

<input type='hidden' name='x_version' value='1.0' />

<input type='hidden' name='x_fp_arg_list' value='x_login^x_fp_arg_list^x_fp_sequence^x_amount^x_currency_code' />

<input type='hidden' name='x_fp_hash' value='".md5($module['acName']."^x_login^x_fp_arg_list^x_fp_sequence^x_amount^x_currency_code^".str_replace("-","",$cart_order_id)."^".$basket['grandTotal']."^".$config['defaultCurrency']."^".$module['actKey'])."' />

<input type='hidden' name='x_fp_sequence' value='".str_replace("-","",$cart_order_id)."' />

<input type='hidden' name='x_currency_code' value='".$config['defaultCurrency']."' />

<input type='hidden' name='x_method' value='NONE' />

<input type='hidden' name='x_name' value='".$ccUserData[0]['title']." ".$ccUserData[0]['firstName']." ".$ccUserData[0]['lastName']."' />

<input type='hidden' name='x_address' value='".$ccUserData[0]['add_1']."' />

<input type='hidden' name='x_address2' value='".$ccUserData[0]['add_2']."' />

<input type='hidden' name='x_city' value='".$ccUserData[0]['town']."' />

<input type='hidden' name='x_state' value='".$ccUserData[0]['county']."' />

<input type='hidden' name='x_zip' value='".$ccUserData[0]['postcode']."' />

<input type='hidden' name='x_country' value='".countryIso($ccUserData[0]['country'])."' />

<input type='hidden' name='x_phone' value='".$ccUserData[0]['phone']."' />

<input type='hidden' name='x_email' value='".$ccUserData[0]['email']."' />

<input type='hidden' name='x_invoice_num' value='".$cart_order_id."' />

<input type='hidden' name='x_instructions' value='".$basket['customer_comments']."' />

<input type='hidden' name='x_amount' value='".$basket['grandTotal']."' />

<input type='hidden' name='x_shipping_amount' value='".$basket['shipCost']."' />";

return $hiddenVars;

}

function success(){

global $basket;

if( (base64_decode($_GET['oid']) == $basket['cart_order_id']) && !isset($_GET['f']) ) {

return TRUE;

} else {

return FALSE;

}

}

///////////////////////////

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...