Closed cen1 closed 10 months ago
Hi @cen1 ,
Is the error coming for ApigeeX or 4g?
Please provide the Drupal error log also the outputcomposer show
.
There is no error log in drupal. It seems some kind of range check either inside m10n or perhaps commerce?
drupal/core 9.4.8 Drupal is an open source content management platform powering millions of websites and applications.
apigee/apigee-client-php 2.0.16 Client library for connecting to the Apigee Edge API.
apigee/apigee-mock-client-php 1.1.1 To be used for queueing mock API responses for the `apigee/apigee-client-php` library.
apigee/apigee_devportal_kickstart 2.1.0 A fast demo and starting point for Apigee Developer Portals.
drupal/apigee_api_catalog 3.0.2 Apigee API Catalog for Drupal
drupal/apigee_edge 2.0.5 Apigee Edge for Drupal.
drupal/apigee_m10n 2.0.3 Apigee Edge Monetization for Drupal
I was also getting this error. This is occurring because you may have checked the "Charge initialization fee" and set the value to zero like so:
The way I fixed the error, was by simply unchecking the "Charge initialization fee". I think this is a validation bug on the UI which leads to this drupal error. That being said, I think it should be fixed on the Drupal side, as you can possibly can also replicate the error (untested) via the API (https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.apiproducts.rateplans#RatePlan), by attaching an "Money" object in the setupFee, and setting the value in the object to 0 - therefore a UI fix in Apigee won't be enough.
Thank you @HiddenFennec for identifying what is causing the issue. @cen1 please try unchecking the "Charge initialization fee" as mentioned by @HiddenFennec to see if it fixes the issue for you. @HiddenFennec if you have a fix for this issue, feel free to create a PR.
@HiddenFennec @cen1 , we are able to replicate this issue and get back with a fix.
@HiddenFennec , @cen1
When we set the Charge initialization fee
as 0
and try to buy the rateplan, INTERNAL: Cost received is non positive
error is thrown.
Unchecking Charge initialization fee
, resolves the error.
In Drupal we use the subscription API to buy a rateplan. An exception is thrown by Apigee if Charge initialization fee
is set as 0
.
Please create a support ticket in Apigee for this.
Closing this issue as the error is from Apigee.
Description
When setting 0$ setup fee for the rate plan through API, the purchase through Drupal Portal fails with
INTERNAL: Cost received is non positive
Example of rate plan:
Steps to Reproduce
Steps to reproduce the behavior:
Actual Behavior
Error
Expected Behavior
Plan is free so it should succeed