chargebee / chargebee-react-native Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Error: Invalid catalog version
at Object.promiseMethodWrapper [as retrieveProductIdentifiers] (NativeModules.js:105:51)
at Function. (Chargebee.ts:68:33)
at Generator.next ()
at asyncGeneratorStep (asyncToGenerator.js:3:16)
at _next (asyncToGenerator.js:25:9)
at asyncToGenerator.js:32:7
at tryCallTwo (core.js:45:5)
at doResolve (core.js:200:13)
at new Promise (core.js:66:3)
at Function. (asyncToGenerator.js:21:12)
following is the code:
const queryParams = new Map();
queryParams.set("limit", "1");
try {
const result = await Chargebee.retrieveProductIdentifiers(queryParams);
console.log(result);
} catch (error) {
console.log(error);
}
Initially, I was using 1 Version APIs to fetch and Subscribe, I haven't faced any issues, but now I am Using 2 Version APIs to fetch the response and Tried to implement it with @chargebee/Chargebee-react-native. I am facing the error as
Error :
"Subscription with New Item Model cannot be created using this Endpoint, Please use create a subscription with item endpoint to create subscription "
Attaching Screenshot for Ref: :
https://lh6.googleusercontent.com/hbin13_kfMjYCveOVgAwpswJmGGsq11unmhdSkPhSSlwou0Ei44AJKxXnmRQERuxlwaV_gn2ReU7F9dKzKJONL_HbnrkvRfHVSMRvfe9VBEWkuc_D8eNrNEF9mYJ-lJtDqL_L3yx-Vis1_WnBfzJf-w3pUydOj6x5b4FYJ9mBBB8DgjRzllDaEdQ4ltMo9-co9Z3HZOMRNSx=w319-h639
<CheckoutCart success={(hostedPageId: string) => successfulPurchase(hostedPageId)} step={(stepName: string) => handleStep(stepName)} site={site} // site Name planName={name} // Plan Name planId={id}. // I am Passing plan Id />
According to this link all new apps and updates to existing apps must use Billing Library version 6 or newer by Aug 31, 2024.
This library is currently at v5.2.1
Hello guys,
I am curious it is possible to get Product Family Chargebee.retrieveSubscriptions
end-point?
It would be great to identify on each platform whether the subscription is from appstore/googlestore?
or maybe extra provide filter query for retrieveSubscriptions
with platform field.
Hi, I added "@chargebee/react-native-chargebee": "^2.4.5" to my project and now all builds fail with the the following error:
node_modules/@chargebee/react-native-chargebee/ios/ChargebeeReactNative.mm:2:9)
1 | #import "ChargebeeReactNative.h"
2 | #import <ChargebeeReactNative-Swift.h>
| ^ 'ChargebeeReactNative-Swift.h' file not found
3 |
4 | @implementation ChargebeeReactNative
5 | RCT_EXPORT_MODULE()
The following build commands failed:
โธ CompileC /Users/expo/Library/Developer/Xcode/DerivedData/Tallio-bbielmlrqyffaodyqcvcjhdlhgly/Build/Intermediates.noindex/ArchiveIntermediates/Tallio/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/ChargebeeReactNative.build/Objects-normal/arm64/ChargebeeReactNative.o /Users/expo/workingdir/build/node_modules/@chargebee/react-native-chargebee/ios/ChargebeeReactNative.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ChargebeeReactNative' from project 'Pods')
โธ (1 failure)
** ARCHIVE FAILED **
The following build commands failed:
CompileC /Users/expo/Library/Developer/Xcode/DerivedData/Tallio-bbielmlrqyffaodyqcvcjhdlhgly/Build/Intermediates.noindex/ArchiveIntermediates/Tallio/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/ChargebeeReactNative.build/Objects-normal/arm64/ChargebeeReactNative.o /Users/expo/workingdir/build/node_modules/@chargebee/react-native-chargebee/ios/ChargebeeReactNative.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ChargebeeReactNative' from project 'Pods')
(1 failure)
Adding @chargebee/react-native-chargebee to a new project doesn't cause and failed builds, so I am wondering if this has to do with another library that I imported for my project. One of the other libraries I am using (@react-native-firebase/app) uses static frameworks. Here is the implementation instructions from that package:
Open the file ./ios/Podfile and add this line inside your targets (right before the use_react_native line in current react-native releases that calls the react native Podfile function to get the native modules config):
use_frameworks! :linkage => :static
To use Static Frameworks on iOS, you also need to manually enable this for the project with the following global to your /ios/Podfile file:
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
Would static frameworks be causing the compatibility issues? If not, have you ran into this problem in any other scenarios?
I have an issue retrieving products on my iOS platform even though I can retrieve their identifiers.
this is how i fetch the product identifiers and i get them back:
const fetchProductsIdentifiers = async () => {
const queryParams = new Map();
queryParams.set("limit", "10");
try {
const result = await Chargebee.retrieveProductIdentifiers(queryParams);
console.log("product identifiers:", result);
} catch (error) {
console.log("Error when fetching product identifiers", error);
console.log(
"=========================",
Platform.OS,
"========================="
);
}
};
but when i call the fetchProducts api with the array returned from the endpoint, i get an [Error: Products not found.]
const fetchProducts = async () => {
try {
const productList = await Chargebee.retrieveProducts([
"Gold_999_1m",
"Silver_199_1m",
"Gold_999_1y",
"Half_yearly_plan_1",
"Yearly_plan_1",
"Monthly_plan_1",
"Weekly_plan_1",
"Daily_plan_1",
]);
setProductIds(productList);
console.log("products:", productList);
} catch (error) {
console.log("Error when fetching product", error);
console.log(
"=========================",
Platform.OS,
"========================="
);
}
};
I have the products i have called all setup on app store connect
So I don't know what might be wrong.
Chargebee.retrieveProducts
with specific identifiers work perfectly, but Chargebee.retrieveProductIdentifiers
crashes even in try-catch block with message "Signal 6 was raised".
const test = async () => {
try {
console.log('>>>>>test>>>> configure')
await Chargebee.configure({
site: 'secret',
publishableApiKey: 'secret',
androidSdkKey: 'secret',
iOsSdkKey: 'secret',
})
console.log('>>>>>test>>>> configure done')
console.log('>>>>>test>>>> start')
const results = await Chargebee.retrieveProductIdentifiers({
limit: 10,
})
// const results = await Chargebee.retrieveProducts(['specific_product_id']) // working
console.log('>>>>>test>>>> end', results)
} catch (err) {
console.log('>>>test err', err)
}
}
Environment:
iPhone Xs
iOS 16.6
React Native 0.72.7
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch @chargebee/[email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@chargebee/react-native-chargebee/lib/typescript/Purchases.d.ts b/node_modules/@chargebee/react-native-chargebee/lib/typescript/Purchases.d.ts
index 06a1e22..407a0e0 100644
--- a/node_modules/@chargebee/react-native-chargebee/lib/typescript/Purchases.d.ts
+++ b/node_modules/@chargebee/react-native-chargebee/lib/typescript/Purchases.d.ts
@@ -24,9 +24,9 @@ export interface Purchase {
readonly status: string;
}
export interface OneTimePurchase {
- readonly invoiceId: string;
- readonly chargeId: string;
- readonly customerId: string;
+ readonly invoice_id: string;
+ readonly charge_id: string;
+ readonly customer_id: string;
}
export declare enum ProductType {
UNKNOWN = "unknown",
diff --git a/node_modules/@chargebee/react-native-chargebee/src/Purchases.ts b/node_modules/@chargebee/react-native-chargebee/src/Purchases.ts
index 4c339d2..e10bfe5 100644
--- a/node_modules/@chargebee/react-native-chargebee/src/Purchases.ts
+++ b/node_modules/@chargebee/react-native-chargebee/src/Purchases.ts
@@ -30,9 +30,9 @@ export interface Purchase {
}
export interface OneTimePurchase {
- readonly invoiceId: string;
- readonly chargeId: string;
- readonly customerId: string;
+ readonly invoice_id: string;
+ readonly charge_id: string;
+ readonly customer_id: string;
}
export enum ProductType {
This issue body was partially generated by patch-package.
Hi guys, I found out that in 2.4.4
version API restorePurchases doesn't work,
I also tried an example with own config credentials.
Could you please try also, maybe something missing in docs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.