/hms-wallet-passgenerator

HMS wallet passgenerator is a sample code for how to create a wallet pass package.

Primary LanguageJavaApache License 2.0Apache-2.0

HMS Wallet Passgenerator

Table of Contents

Introduction

This is sample code for how to create wallet pass package.

Installation

Before running the Demo code, you should have installed Java and Maven. You should have gotten a .pem file and a .cer file.

Supported Environments

Oracle Java 1.8 is recommended.

Configuration

  1. Edit the src\test\resources\release.config.properties according to your service ID, pem file, and cer file.
  • Set the pass.privatekey.YourServiceID paramter. For example, if your service ID is hwpass.com.huawei.wallet.pass.sdktest, rename the paramter to pass.privatekey.hwpass.com.huawei.wallet.pass.sdktest. Then do base64 encoding to the entire .pem file. Then set the base64 string as the value of this paramter.

  • Set the pass.certificate.YourServiceID paramter. For example, if your service ID is hwpass.com.huawei.wallet.pass.sdktest, rename the paramter to pass.certificate.hwpass.com.huawei.wallet.pass.sdktest. Then do base64 encoding to the entire .cer file. Then set the base64 string as the value of this paramter.

  1. Set your service ID to the TEST_PASS_TYPE parameter in the "src\test\java\PassFileServiceTestUtil.java" file.

Sample Code

  1. Run the testCreatePassFile method in the "src\test\java\PassFileReleaseTest.java" file to create a .hwpass file.

  2. Run the testCreateMessage method in the "src\test\java\PassFileReleaseTest.java" file to create a signature.

Question or issues

If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

License

HMS wallet server sample code is licensed under the Apache License, version 2.0.