Hi,

I seem not to be able to get around this .. I have read alot of posts that eventually got me to this stage..

A little bit of history :

I first got the vendor unknown error which had to do with the policy change Ogone made to their SHA.
They did a reset to old policy which got me past this error.
After a succesfull payment i return to http://mysite/cart/checkout
and receive an error : "Ogone returned an error for your payment. Your order is not completed" and my cart is not emptied
Although if i take a look at the table uc_payment_ogone it perfectly added a record with order status 41 and sha_test_success OK
Furthermore i receive an email from ogono to notify me of a succesfull order.
Any help would be appreciated.

Kind regards,

Yves

Comments

yvesa’s picture

Furthermore it is not clear from the readme file what should be entered as post payment url..

Thanx !

Jurgen8en’s picture

Hi,

Don´t know if this helps, this is my Ubercart 1.x code:
Added the first if test.

function uc_ogone_ok() {
  $ogone_order_id = $_SESSION['ogone_order_id'];
  if(empty($ogone_order_id)){
  	  watchdog('uc_ogone_payment', 'empty ogone_order_id', WATCHDOG_ERROR);
  	  drupal_goto('cart/checkout/complete');
  }
  $result = db_query("SELECT sha1_test_succes FROM {uc_payment_ogone} WHERE order_id = %s", $_SESSION['ogone_order_id']);
  $ogone_order = db_fetch_object($result);
  //Debug
  //print_r($ogone_order);
  watchdog('uc_ogone_payment', 'order: '.print_r($ogone_order, true), WATCHDOG_ERROR);
  //exit;
  if ($ogone_order->sha1_test_succes == 'OK'){
    uc_order_update_status($_SESSION['ogone_order_id'], uc_order_state_default('payment_received'));
    
    //Debug
    //drupal_set_message('cartid:'.uc_cart_get_id().' ogone order id:'.$_SESSION['ogone_order_id']);

    // Ensure the cart we're looking at is the one that payment was attempted for.
    $_SESSION['cart_order'] = $_SESSION['ogone_order_id'];
    unset($_SESSION['ogone_order_id']);

    // This lets us know it's a legitimate access of the complete page.
    $_SESSION['do_complete'] = TRUE;
    
    drupal_goto('cart/checkout/complete');
  }else{
    drupal_goto('cart/ogone_false');
  }
  //}
}
yvesa’s picture

Thanx for your response.. am using ubercart 2.x tho..
Prolly better not to add code from the 1.x right?

Y.

pistol’s picture

StatusFileSize
new267.84 KB

i am also getting the same error from ogone. I used payment methode "überweisung / vorkasse" where i have to manually log into my bankaccount after my purchase and do the payment. nevertheless i was sent back to my site with the same error message that was posted above. (see attached screenshot)

cmos’s picture

The order status 41 is not ok because it means that payment is not done and uc_ogone returns ok only if statuses are 5 or 9.
You can check the OGONE status codes for clarification at this address: https://secure.ogone.com/ncol/PAYMENTINFOS1.asp

pieterdc’s picture

Version: 6.x-1.8 » 6.x-1.9
pieterdc’s picture

Version: 6.x-1.9 » 6.x-1.x-dev
Component: Miscellaneous » Code
Category: support » bug
Status: Active » Needs review
StatusFileSize
new11.49 KB
new5.74 KB

As @cmos said in comment #5 "uc_ogone returns ok only if statuses are 5 or 9" and thus not if status 41.

I made a patch that can process status 41 and various other statuses. But it needs to be tested.

bartezz’s picture

robbertnl’s picture

Status: Needs review » Closed (duplicate)