Mobile Pay
The Mobile Pay plugin is designed to implement direct mobile payments through Google Pay, Apple Pay, Stripe, Adyen, Wayforpay, Liqpay, etc., on your mobile application projects for both Android and iOS, built using Construct 3.
The Mobile Pay plugin is used in payments for physical or tangible products, which is not subject to Google and Apple's 15% to 30% cut for digital products.
For digital product payments, please use the Mobile IAP (Pro) plugin.
Introduction
The Construct Master Collection supports the full and easy integration of native mobile Android SDKs and iOS SDKs for both Construct 3 and Construct 2.
Please click here to learn more about Mobile.
Features
The Mobile Pay plugin is designed to implement direct mobile payments through Google Pay, Apple Pay, Stripe, Adyen, Wayforpay, Liqpay, etc., on your mobile application projects for both Android and iOS, built using Construct 3.
The Mobile Pay plugin is used in payments for physical or tangible products, which is not subject to Google and Apple's 15% to 30% cut for digital products.
For digital product payments, please use the Mobile IAP (Pro) plugin.
Here are some of the native features of the mobile plugin:
Mobile payments for physical or tangible products.
Direct payments for mobile.
Google Pay
Apple Pay
Multiple payment gateway services support.
Stripe
Adyen
Wayforpay
Liqpay
etc.
Native mobile debugging features
Well maintained and fully tested for production release.
For more information about native mobile or Android and iOS features, please click here to learn the introductory lessons to Mobile.
Platform Integration
Here are some of the platforms that are natively supported:
Android
iOS
Native Android
Native iOS
Build Support
Here are some of the supported build options:
Construct 3 Build Service
Android Studio
Xcode
Phonegap
Editor Features
Here are some of the features in the Construct editor:
Construct 3
How to use?
It is easy to use the Mobile Pay plugin, you will only need to follow the steps below.
1. The first step is to add the Mobile Pay object into the project.
2. If the Debug property is checked, the plugin will log information and errors in the console for mobile debugging. Set this unchecked for your production release builds.
Documentation
Unfortunately, the Construct 3 Plugin SDK doesn't have the necessary features to automate the requirements of Google Pay and Apple Pay. Therefore, you will have to set your application configurations manually before uploading the files into the Construct 3 Build Service for Android or iOS building.
Android
For Android, you need to register and fill all the required forms in the Google Business Console.
Export your Construct 3 project to Android.
Select the Cordova project option.
You will receive a ProjectName.zip file.
Extract the compressed files in ProjectName.zip into a folder.
Add the following tags in the config.xml: <config-file parent="/manifest/application" target="AndroidManifest.xml"> <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" /> </config-file>
For testing and producing screenshots of your buy flow for submission to Google, add the following tag in the config.xml: <preference name="GooglePayEnvironment" value="test" />
Repack the updated files into a.zip file, back to ProjectName.zip.
Open the Export manager in the Construct 3 editor, through Menu > View > Export Manager.
The Export Manager dialog will launch, click the plus sign (+) to upload your Project Name.zip.
Build your project, you can now export the usual way. For example: debug .apk, release .apk, Android App Bundles, Android Studio, etc.
iOS
For iOS, you need to have a valid Apple Developer account.
You need a fully set up merchant account with Apple Pay capability.
You also need a merchant id configured in your Xcode project. Click to get your merchant id.
Export your Construct 3 project to iOS.
Select the Cordova project option.
You will receive a ProjectName.zip file.
Extract the compressed files in ProjectName.zip into a folder.
Add the following tags in the config.xml: <platform name="ios"> <config-file target="*-Debug.plist" parent="com.apple.developer.in-app-payments"> <array> <string>developer merchant ID here</string> </array> </config-file> <config-file target="*-Release.plist" parent="com.apple.developer.in-app-payments"> <array> <string>production merchant ID here</string> </array> </config-file> </platform>
Repack the updated files into a.zip file, back to ProjectName.zip.
Open the Export manager in the Construct 3 editor, through Menu > View > Export Manager.
The Export Manager dialog will launch, click the plus sign (+) to upload your Project Name.zip.
Build your project, you can now export the usual way. For example: Xcode project.
Actions, Conditions & Expressions
Actions
The following action groups:
General
Payment
General
Initialize - Initialize the mobile payment and payment gateway sdks.
Payment
iOS Pay - Run to make a payment request on iOS.
Merchant Id - Your merchant id. For example: "merchant.com.example".
Purpose - The purpose of payment.
Currency - The currency code, for example: "USD".
Amount - The amount in the specified currency.
Country Code - The country code of payment origin.
Android Pay - Run to make a payment request on android.
Merchant Id - Your merchant id. For example: "merchant.com.example".
Purpose - The purpose of payment.
Currency - The currency code, for example: "USD".
Amount - The amount in the specified currency.
Country Code - The country code of payment origin.
Gateway - The payment processor to use.
Merchant Id - Your Google Pay merchant id.
Merchant Name - Your Google Pay merchant name.
Conditions
The following condition groups:
General
Payment
General
On initialized - Trigger fires when the mobile payment sdk has finished initializing.
Is initialized - Check if the mobile payment sdk is initialized.
Payments
Is supported - Check if payment is supported.
On payment success - Trigger fires after a successful payment.
On payment failure - Trigger fires after a cancellation or failure of payment.
Expressions
The following expression groups:
Payment
Error
Payment
EventResponse - The event response after a payment request, in JSON string.
Error
ErrorMessage - The error message response after a payment request cancellation or failure.
Showcase
There is currently nothing to show, we will add more in the future.
Game Projects
Instructions Kit
Specifications
-
Instructions - The game project contains instructions and steps on how to use the addon and its features.
-
Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.
-
Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.