Type field in cscart_order_data table

Hello guys



What is Type field in “cscart_order_data table” table?



In fn_finish_payment and some other functions that are related to Orders,

queries are for orders with ‘S’ in type field


$valid_id = db_get_field("SELECT order_id FROM ?:order_data WHERE order_id = ?i AND type = 'S'", $order_id);



When i make an order, the Type field is “R”



what does it mean?:confused:

I think it means Supplier for ‘S’. I beleive It may take on different values for different contexts.

I think it means Start Payment



fn_start_payment set type to ‘S’ (after check a condition)



Now i am trying to find why it does not happen for me and its always ‘R’





Thanks for your consideration.

Hello IceProgrammer15,



Information about secondary currencies is stored in the db field with the ‘R’ type. As regards type ‘S’, it is a temporary type.

Thanks a lot for your help.



I dont understand payment process for non-background payment systems.



I check fn_start_payment , and it works fine for some kind of payment systems that we can get result of payment imediately

But i dont know how it works for another payment systems like Paypal that gateway will inform cs-card by calling a SuccessURL or ErrorUrl.



In my case, it happen like below :



1-fn_start_payment will set TYPE field to ‘S’

2-then will call payment processor

3-and then call fn_finish_payment

so if i set $pp_response in payment processor, the fn_finish_payment work successfully



But its not possible, because i need to wait until BANK return results,

and when i receive results in payment processor and call fn_finish_payment

it does not work! why? because the TYPE field is not ‘S’ anymore and its ‘R’ , so fn_finish_payment will fail because it look for ‘S’ value in TYPE field.



If anyone can explain it a bit, it can be great :wink:

[quote name=‘IceProgrammer15’]Thanks a lot for your help.



I dont understand payment process for non-background payment systems.



I check fn_start_payment , and it works fine for some kind of payment systems that we can get result of payment imediately

But i dont know how it works for another payment systems like Paypal that gateway will inform cs-card by calling a SuccessURL or ErrorUrl.



In my case, it happen like below :



1-fn_start_payment will set TYPE field to ‘S’

2-then will call payment processor

3-and then call fn_finish_payment

so if i set $pp_response in payment processor, the fn_finish_payment work successfully



But its not possible, because i need to wait until BANK return results,

and when i receive results in payment processor and call fn_finish_payment

it does not work! why? because the TYPE field is not ‘S’ anymore and its ‘R’ , so fn_finish_payment will fail because it look for ‘S’ value in TYPE field.



If anyone can explain it a bit, it can be great :wink:[/QUOTE]



Hello, IceProgrammer15

Are you able to sort this issue. We are also facing the same.



Dr Y P Gogia