Vous êtes ici Forums
  |  Connexion
 Forums
HomeHomeProjetsProjetsStore : dévelop...Store : dévelop...My own PaymentGatewayProvider - OrderID doesnt increase after invoking invokePaymentSucceeded();My own PaymentGatewayProvider - OrderID doesnt increase after invoking invokePaymentSucceeded();
Précédente
 
Suivante
Nouveau message
30/07/2009 17:42
 

Hi, i have been struggling with getting the DNN Store (02.01.17) to increase the cart number/order id after i have finnished talking to my payment service. However, DNN Store reuses the same order id when i make a new order, why? What i found documentation about and what i thought i need to do is the following:

  1. Implement the code needed to talk to my payment service
  2. Once i have done whatever i needed to do, just call "invokePaymentSucceeded();" and DNN Store will update all its internal data and everyone will be happy... but it doesnt.

The following is the code that follows after i have received a "OK" from the payment service:

//Adds the order to the db...  why should i need to do this in the payment provider code??
OrderInfo orderInfo = CheckoutControl.GetFinalizedOrderInfo();

// Update the order status to Paid
OrderController orderController = new OrderController();
orderController.UpdateOrder(orderInfo.OrderID, orderInfo.OrderDate, orderInfo.OrderNumber, orderInfo.ShippingAddressID, orderInfo.BillingAddressID, orderInfo.Tax, orderInfo.ShippingCost, true, (int)OrderInfo.OrderStatusList.Paid, orderInfo.CustomerID);

// Clear the cart, why doesnt the store do this?
CurrentCart.ClearItems(PortalId);

// Found documentation that this was the only thing left to do...
invokePaymentSucceeded();

// Hide the graphics controls
CheckoutControl.Hide();
PanelSoEasyPayPayment.Visible = false;

 

Please, what am i doing wrong and is there some documentation or source code regarding what i need to do? Right now i am fumbling in the dark because i cant find any real source code to a real and working payment gateway provider implementation.

UPDATE:

In order for the Order ID to increase, you have to "Delete" the current cart.

Replace
CurrentCart.ClearItems(PortalId);
with
CurrentCart.DeleteCart(PortalId);

 
Nouveau message
09/10/2009 16:37
 

Hi,

Please use the last version 02.01.21 available at Codeplex! A lot of changes has been done in the chekout workflow.

Gilles

 
Nouveau message
09/10/2009 16:47
 

YES ! ... a lot !

;-) Gilles

 

david.

 
Précédente
 
Suivante
HomeHomeProjetsProjetsStore : dévelop...Store : dévelop...My own PaymentGatewayProvider - OrderID doesnt increase after invoking invokePaymentSucceeded();My own PaymentGatewayProvider - OrderID doesnt increase after invoking invokePaymentSucceeded();