chargebee / chargebee-dotnet

.NET library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=dotnet
MIT License
20 stars 24 forks source link

Missing .Embed() method in HostedPage.CheckoutNewForItems and HostedPage.CheckoutExistingForItems requests for Product Catalog 2.0 #70

Closed mtomberger closed 1 month ago

mtomberger commented 3 months ago

Description of the Bug

I tried to migrate a Application which uses the Chargebee .NET API to be compatible with Product Catalog 2.0. I replaced the API methods according to the upgrade guide, but it is not possible to set the embed flag to true after using the new methods. It looks like this method is missing from the new API flow.

Steps to reproduce

1) Use the new API methods for Product Catalog 2.0 to create a HostedPage using HostedPage.CheckoutExistingForItems() or HostedPage.CheckoutNewForItems() 2) Try to set the embed flag to ture via the API

Expected Behavior

The emped flag can be set to true with a .NET API Method within the CheckoutNewForItemsRequestand CheckoutExistingForItemsRequest classes

Code Snippets (if applicable)

var resultPC1 = HostedPage.CheckoutNew()
                                .CustomerEmail(m.CustomerMailAdress)
                                .SubscriptionPlanId("basic-USD")
                                .RedirectUrl(redirectUrl)
                                .Embed(false); //this method works as expected

var resultPC2 = HostedPage.CheckoutNewForItems()
                                .CustomerEmail(m.CustomerMailAdress)
                                .SubscriptionItemItemPriceId(0, "basic-USD")
                                .RedirectUrl(redirectUrl)
                                .Embed(false);//this method does not exist

Operating System

Windows

Language version

.NET 8

Library version

3.18.1.0

Additional context

No response

cb-alish commented 3 months ago

Hi @mtomberger, .Embed is not supported in Product Catalog v2. Can you elaborate on your use case / what you're trying to achieve please?

mtomberger commented 3 months ago

I try to upgrade a application which uses .Embed(false) in various places. If omitting this call in Product Catalog 2.0 has the same effect as setting embed to false in Product Catalog 1.0 there is no problem.

cb-alish commented 3 months ago

Hi @mtomberger , the default behavior for the latest versions of checkout (in app and full page layout) is Embed = false. Please do let us know if you face any issues with this.

cb-sriramthiagarajan commented 1 month ago

Hi @mtomberger, I'm closing this issue as it's been addressed. Please feel free to reopen if you have any more questions.