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 Billing plugin.

PlayFab API v2.png

Introduction

Step 1.png

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 Billing 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:


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

  1. For Android, you need to register and fill all the required forms in the Google Business Console.

  2. Export your Construct 3 project to Android.

  3. Select the Cordova project option.

  4. You will receive a ProjectName.zip file.

  5. Extract the compressed files in ProjectName.zip into a folder.

  6. 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>

  7. 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" />

  8. Repack the updated files into a.zip file, back to ProjectName.zip.

  9. Open the Export manager in the Construct 3 editor, through Menu > View > Export Manager.

  10. The Export Manager dialog will launch, click the plus sign (+) to upload your Project Name.zip.

  11. Build your project, you can now export the usual way. For example: debug .apk, release .apk, Android App Bundles, Android Studio, etc.



iOS

  1. For iOS, you need to have a valid Apple Developer account.

  2. You need a fully set up merchant account with Apple Pay capability.

  3. You also need a merchant id configured in your Xcode project. Click to get your merchant id.

  4. Export your Construct 3 project to iOS.

  5. Select the Cordova project option.

  6. You will receive a ProjectName.zip file.

  7. Extract the compressed files in ProjectName.zip into a folder.

  8. 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>

  9. Repack the updated files into a.zip file, back to ProjectName.zip.

  10. Open the Export manager in the Construct 3 editor, through Menu > View > Export Manager.

  11. The Export Manager dialog will launch, click the plus sign (+) to upload your Project Name.zip.

  12. Build your project, you can now export the usual way. For example: Xcode project.

 

Actions, Conditions & Expressions

Actions

press to zoom

press to zoom
1/1

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

press to zoom

press to zoom
1/1

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

press to zoom

press to zoom
1/1

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.

Object   Properties

Plugin Properties

press to zoom

press to zoom
1/1

The following property groups:

  • Configuration

Configuration - The options to set the plugin settings.

  • Debug - If checked, the runtime will log runtime notifications. This should be unchecked on production builds.

 
 

Showcase

There is currently nothing to show, we will add more in the future.

 

Game Projects 

Instructions Kit

Construct 3 Project
Construct 3 Project

press to zoom
Construct 2 Project
Construct 2 Project

press to zoom
Construct 3 Project
Construct 3 Project

press to zoom
1/2

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.

Supporters

Only