[Stripe] Cordova plugin functions not referenced
Question
Forge component by assif_tiger
Application Type
Mobile

Hi, would you be able to help with this?

When running the validate plugin code, the result is negative because cordova.plugins.stripe doesn't exist.

The common plugin is referenced, but in you modules and your documentation there I cannot determine if there is something else I need to do. The script 

IsPluginAvailableJS

Returns: Error code = -1 and 'Cannot read property 'stripe' from undefined'.

I tried this on an Android device in a natively generated app.

Thanks for your help.

Solution

Hi Atif, I have redone the whole process: install the plugin, reference into my app, regenerate native app, implement code from plugin and now it is working! I would say to anyone struggling to follow these steps and try it again if it doens't work the first time around. Thanks.

Hi,

Thanks for the finding. Yes, we'll update the dependency for Common-Plugin required in the documentation & references.

Make sure you have Common Plugin Installed in order to use:
https://www.outsystems.com/forge/component-versions/1417


Let me know if there's anything.

Hi Assif, I have the common plugin installed, but the stripe functions are not available.

Can you please confirm, Stripe actions are consumed in your app as an dependency & also please note this plugin is not supported for ReactiveMobile Apps.


Hi Assif, thanks for your reply and help!

Yes, I believe I have consumed the Stripe plugin correctly and have the common plugin installed. What is happening during the native build, is that including the references causes the build to fail with the following error:

[ERROR] [Build] Build failed with the following error: Your app was not generated. We couldn't fetch its dependencies from the repository server jcenter.bintray.com due to a server error. Please try again later or contact our support team if the problem persists.

Earlier in the log there is this entry confirming the plugin was being included:

[VERBOSE] [Build] copy  platforms/android/platform_www/plugins/cordova-plugin-stripe/www/CordovaStripe.js platforms/android/app/src/main/assets/www/plugins/cordova-plugin-stripe/www/CordovaStripe.js (updated file)

When I remove the stripe plugin, the native build completes succesfully so I am certain it is an issue with the plugin.

By the way, when I tried the same a few days ago, the following error prevented the successful build, I am not entierly sure why this now has changed.

Error: Error compiling Cordova plugin: main/java/com/zyramedia/cordova/stripe/CordovaStripe.java:12: error: cannot find symbol.

Do you have any idea what the problem might be?


Hi Assif, did you seem my last comment? 

https://www.outsystems.com/forums/discussion/69153/cordova-plugin-functions-not-referenced/#Post277892

I am wondering if you can let me know if the issue I am encoutering is possibly an issue wiht the plugin or is it an issue with my application?

Solution

Hi Atif, I have redone the whole process: install the plugin, reference into my app, regenerate native app, implement code from plugin and now it is working! I would say to anyone struggling to follow these steps and try it again if it doens't work the first time around. Thanks.

Happy to know.
But strange it didn't happen on my side; may because I created a new sample to test.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.