Marmalade extension details:
Platform limitations: none; the extension is only using s3e cross-platform core API (s3eWebView)
Targeted Marmalade SDK: 6, 7
If you don't have a Paymentwall Merchant Account yet, please Sign Up.
Integration with Marmalade consists of 2 steps:
Loading Paymentwall widget
Include the files pwWidgetCallApi.h, pwWidgetCall.cpp attached to this article into your Marmalade project. After that the widget can be loaded using the following code snippet:
string uid ("user123"); string akey("a8703ad50fdeeccafe764aa783ced48b"); string goodid("product.500credits"); s3eDebugSetInt(S3E_DEBUG_FONT_SCALE, fontScale); pwWidgetCallApi *widgetCall = new pwWidgetCallApi(akey); widgetWebView = widgetCall->getWidgetView(uid, goodid); s3eWebViewShow(widgetWebView, offset_left , offset_top, s3eSurfaceGetInt(S3E_SURFACE_WIDTH) - offset_left - offset_right, s3eSurfaceGetInt(S3E_SURFACE_HEIGHT) - offset_top - offset_bottom ); s3eSurfaceClear(0x10,0xCC,0x10);
You can also find a code sample of a project that is using Paymentwall widget in main.cpp file attached to this article.
Parameters that are being used in the widget call:
- akey - applicaiton key given by Paymentwall once you create a project under your Paymentwall Merchant Account
- goodid - ID of the product as it is set up in Products section of your Paymentwall Merchant Account
- uid - identifier of the end-user in your system that will be sent back in pingbacks once the end-user pays
For pingback processing, refer to Pingback Processing section of the Digital Goods API.
If you have any questions, please feel free to contact us at email@example.com