OrderPlaced and external service - Ecommerce - Ecommerce - Progress Community

OrderPlaced and external service

 Ecommerce

OrderPlaced and external service

  • OrderPlaced and external service
  • Hi,

    I (like to) use the OrderPlaced event to create subscription plans within Stripe and PayPal. I have all the logic ready, but I have some problems to implement this.

    When the event is firing I need to check some details using a REST call to Stripe. I think here is the problem, since the OrderPlaced event at that point breaks and I'm unable to finish my custom code.

    What should be the right way to implement this?

    private void EcommerceEvents_OrderPlaced(Guid orderid)
        ...
        // API Call to Stripe
        var stripeCustomer = customerService.Get(user.Id.ToString());
        // Here the code stops.
        ...

    Any ideas?

    Best,
    Daniel

  • Alright, this was due to an Exception that was thrown. I expected a result from that call, but it threw an Exception. So with help of a Try/Catch block, I can now act on it.

    Daniel