<%temp_interface_defray_receive_handle=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_interface_defray_receive_handle -->
<%
site.temp.interface.defray.OrderCheck()
'site.temp.interface.defray.InterfaceSelectedCheck()
site.temp.interface.defray.GetInterfaceInfo()
site.temp.customer.Order.GetInfo site.temp.interface.defray.order_mark, ""
site.temp.interface.defray.suc=false
site.object(temp_interface_defray_receive_handle).Search_Include site.object(temp_interface_defray_receive_handle).id, site.temp.interface.defray.interface_mark

If site.temp.interface.defray.suc Then

	content = "customer_order_temp=1,"
	content = content + "customer_order_addtime='" & Now() & "',"
	content = content + "customer_order_stat=2,"
	content = content + "customer_order_stat_description='确认到款',"
	content = Left(content, Len(content) - 1)

	If site.temp.customer.Order.EditInfo(site.temp.customer.Order.order_mark, content) And site.temp.customer.account.EditInfo(request("consume_id"), "customer_consume_temp=1") Then
        site.temp.customer.Order.AddCount(site.temp.customer.Order.order_mark) '增加积分
        site.temp.customer.Order.EditSellnum(site.temp.customer.order.order_mark) '修改销售量
		site.temp.customer.Order.SendMail(site.temp.customer.Order.sort_id)
		site.Error.info =site.Error.info+ "支付成功！以下是此次交易的信息：<br>"
		site.error.info=site.error.info+"·订单号："&site.temp.customer.order.order_mark&"<br>"
		site.error.info=site.error.info+"·交易金额："&site.info.unit_money(1)&" "&site.temp.customer.order.order_money&"<br>"
		site.error.info=site.error.info+"·交易日期："&site.temp.customer.order.order_addtime&"<br>"
		site.Error.info = site.Error.info + "到此您的订单状态已经自动更改为<确认到款>，您可以继续完成订单！<br>"
		site.Error.location = ""
		site.error.suc()
	Else

		site.temp.customer.Order.DropOrder (site.temp.customer.Order.order_mark)
		site.temp.customer.account.DeleteInfo (request("consume_id"))
	    site.Error.location="2"
	    site.Error.err()
		
	End If

Else

	site.temp.customer.Order.DropOrder (site.temp.customer.Order.order_mark)
	site.temp.customer.account.DeleteInfo (request("consume_id"))
	site.Error.location="3"
	site.Error.err()

End If
%>
