----
Sorry about making a new thread,
got tons of errors when posting a reply in the original thread.
----
Hi Lasse,
It's been a while, summer holidays and all :-)
But i still have some questions about gateway providers.
I've made an override for the method GetReturnValuesFromUrl() and in it i look at my response from me payment provider and update my orders.
Basicly i have 2 scenarios, Success or fail, if i, as i read you previous reply, use the value from Ecom:Order.Gateway.Page.OK as my response adress from paymentmodule, I hit my step 6 as i should when the payment went well.
But i also hit step 6 when somthing goes bad, and DW creates an order.
Can i somewhere in the GetReturnValuesFromUrl() method, tell DW not to create the Order when something went wrong with a payment.
ATM my code looks like this:
public override void GetReturnValuesFromUrl( Dynamicweb.eCommerce.Orders.Order Order ) {
string Status = getQueryString( "status" ).ToUpper();
string Status_code = getQueryString( "Status_code" );
string OK_url = string.Format( "/Default.aspx?ID={0}&_OID_={1}&step=5&TransactionState=Ok", getQueryString( "ID" ), Order.ID );
string ERROR_url = string.Format( "/Default.aspx?ID={0}&_OID_={1}&step=5&TransactionState=Error", getQueryString( "ID" ), Order.ID );
// If transaction was successfull do this
if ( Status.Equals("A") && Status_code.Equals("0") ) {
//Order.GatewayResult = "";
Order.TransactionNumber = getQueryString( "Transaction_id" );
Order.TransactionPayGatewayCode = getQueryString( "Payment_method" );
Order.TransactionType = getQueryString( "Card_type" );
Order.TransactionStatus = Status + "" + Status_code;
Order.TransactionAmount = Order.Price.PricePIP;
Order.UpdateGatewayResult( true );
} else {
// There was an error
}
base.GetReturnValuesFromUrl( Order );
}