Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error-Response not useful for non-valid subscription addon. #370

Closed
azngeek opened this issue Sep 21, 2018 · 4 comments
Closed

Error-Response not useful for non-valid subscription addon. #370

azngeek opened this issue Sep 21, 2018 · 4 comments
Assignees
Labels
V2 V2 Client

Comments

@azngeek
Copy link

azngeek commented Sep 21, 2018

Lets assume that you have a plan with fixed add-ons and you try to add an add-on which is not defined in the plan.

This might be the xml with the invalid addon

xml
<?xml version="1.0"?>
<purchase>
	<account>
		<account_code>100067545</account_code>
		<first_name>Test</first_name>
		<last_name>User</last_name>
		<email>t@test.de</email>
		<billing_info>
			<token_id>qQYe28t1xDzHqAQy9IDI0Q</token_id>
		</billing_info>
		<address>
			<address1>Klaus-Dieter-Eckert-Platz 558</address1>
			<city>Rees</city>
			<zip>48555</zip>
			<country>DE</country>
		</address>
	</account>
	<adjustments/>
	<collection_method>automatic</collection_method>
	<currency>EUR</currency>
	<subscriptions>
		<subscription>
			<plan_code>1</plan_code>
			<unit_amount_in_cents>0</unit_amount_in_cents>
			<quantity>1</quantity>
			<subscription_add_ons>
				<subscription_add_on>
					<unit_amount_in_cents>240</unit_amount_in_cents>
					<quantity>1</quantity>
					<add_on_code>HZ02B</add_on_code>
				</subscription_add_on>
			</subscription_add_ons>
		</subscription>
	</subscriptions>
</purchase>

And this is the method called

\Recurly_Purchase::invoice($purchaseAggregate->getPurchase(), $client);

So i would assume to get an error like addon not allowed but instead get this one:

  [Recurly_ValidationError] Next bill date is invalid.

So is there something wrong with my settings as i need to get more meaningful error messages.

@aaron-junot aaron-junot self-assigned this Sep 21, 2018
@aaron-junot
Copy link

@azngeek I have confirmed the behavior you described. It appears that this is an error with the API and not the client libraries. I'm going to investigate further and let you know what the solution is.

@aaron-junot aaron-junot removed the bug? label Sep 21, 2018
@aaron-junot
Copy link

@azngeek I opened a ticket with the team who maintains that portion of the API. I will close out this issue with additional information when that team addresses that ticket. Thanks for pointing this out.

@azngeek
Copy link
Author

azngeek commented Sep 21, 2018

Thanks for that .

@aaron-junot
Copy link

Hey there @azngeek! The team fixed this issue a couple months ago but I just found out today. Everything should have been fine since late March. If you see this problem again (or see this same error in your logs from April until now), please let us know and we can re-open the issue and take a look at it. Thanks!

@bhelx bhelx added the V2 V2 Client label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 V2 Client
Projects
None yet
Development

No branches or pull requests

3 participants