简体   繁体   中英

Android pay integration

I want to integrate Android pay integration in my application, I got the source code from this repo: https://github.com/android-pay/androidpay-quickstart

My problem was:

<resources>
  <string name="public_key">BO39Rh43UGXMQy5PAWWe7UGWd2a9YRjNLPEEVe+zWIbdIgALcDcnYCuHbmrrzl
7h8FZjl6RCzoi5/cDrqXNRVSo=</string>

<string name="stripe_publishable_key">REPLACE_ME</string>
<string name="stripe_version">REPLACE_ME</string>
</resources>

Where can I get stripe_publishable_key and stripe_version for testing mode Android Pay?

If you check the source code, those two strings are only used in one location :

...
if (mUseStripe) {
    // Stripe integration
    maskedWalletRequest = WalletUtil.createStripeMaskedWalletRequest(
            Constants.ITEMS_FOR_SALE[mItemId],
            getString(R.string.stripe_publishable_key),
            getString(R.string.stripe_version));
} else {
    ...

In other words, they are only relevant if Stripe is your payment processor. The meaning of them is explained in the Stripe documentation :

Publishable API keys are meant solely to identify your account with Stripe, they aren't secret. In other words, they can safely be published in places like your Stripe.js JavaScript code, or in an Android or iPhone app. Publishable keys only have the power to create tokens.

Secret API keys should be kept confidential and only stored on your own servers. Your account's secret API key can perform any API request to Stripe without restriction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM