ArioAtlas / react-native-cafe-bazaar

In-App billing for Cafe Bazaar (local android market)
MIT License
26 stars 9 forks source link

When I use your library, this message app here "there is no product" #12

Closed sam9010 closed 5 years ago

sam9010 commented 5 years ago

hi I used your library to pay for the app And I did all the settings that you said, But my app encountered an error When I use this message" there is no product" my code:

   CafeBazaar.open()
            .then(() => CafeBazaar.purchase('tansazReactNative', '', 1840))
            .then((details) => {
                alert(JSON.stringify(details));
                return CafeBazaar.close()
            })
            .catch((err) =>{
                if(err.code==="E_SETUP_DISCONNECT"){
                    alert("cafeBazaar Not install, please install it and so try again");
                }else{
                    alert(JSON.stringify(err))
                }
            } );

You can see for better picture of mycode+result in my app

thanks

arashmilani commented 5 years ago

Thank you for submitting the issue. What is the err.code for this specific error you are getting? Also can you confirm that a product with exact SKU of tansazReactNative exists in you developer console of Cafebazaar?

sam9010 commented 5 years ago

Yes it is there

you can see it

sam9010 commented 5 years ago

I found my problem The package project should be the name of the package in the cafe bazaar :)

I tested the sample project like it

arashmilani commented 5 years ago

آappy to hear that you found the cause of the issue. So I'm closing this issue.