new payment method

  • Posts: 120
  • Thank you received: 2
11 years 3 months ago #120830

found problem
should use this
$orderClass

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 2
11 years 3 months ago #120867

my problem now it is:
after payment and verify two rows save at database for an order
1.order_status = created
2. order_status = confirmed
what's problem? I use this code for save at database

$orderClass = hikashop_get('class.order');
$order = new stdClass();
$order->order_id = $paymentID;
$order->order_status = 'confirmed';
$order->history = new stdClass();
$order->history->history_notified = 1;

$order->order_status = $element->payment_params->verified_status; 
$order->order_id = $dbOrder->order_id;
$order->history->history_data = ob_get_clean().'/r/n'.$referenceId;
$orderClass->save($order);  
return true; 

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 3 months ago #120875

Hi,
I didn't really understood your problem can you give us more precision about it ?

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 2
11 years 3 months ago #120879

Hi mohamed
save at database twice for each payment
see this pic it's one payment but save at two rows

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 3 months ago #120908

Hi,
You should use this kind of code if you want to save you order:

$this->modifyOrder($order->order_id, $order->order_status , $history, $email);
Instead of the "$orderClass->save($order);" function.
You should also check how you'll have to set the $email variable through the Amazon code for example.

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum