Giter VIP home page Giter VIP logo

stripe's Introduction


Stripe

Capacitor community plugin for native Stripe.

packages

package name description path
@capacitor-community/stripe Support for non-personal payments using Stripe /packages/payment
@capacitor-community/stripe-identity Supports identity verification using Stripe /packages/identity
@capacitor-community/stripe-terminal Support for in-person payments using Stripe /packages/terminal

Hint

Versions

Users of Capacitor v5 should use version v5 of the Plugin.

% npm install @capacitor-community/stripe@5
% npm install @capacitor-community/stripe-identity@5
% npm install @capacitor-community/stripe-terminal@5

How to use Stripe Android currently package

Capacitor Android 6's default settings is here:

minSdkVersion = 22
compileSdkVersion = 34
targetSdkVersion = 34

To use the latest Stripe Android, you need to version these up. To use the latest features, follow these steps.

  1. Open android/variables.gradle and change sdkVersion version, if need.
  2. Add stripeAndroidVersion, identityVersion or stripeterminalCoreVersion and set required version. Release information is here:
  ext {
-   minSdkVersion = 22
+   minSdkVersion = 26
    compileSdkVersion = 34
    targetSdkVersion = 33
    androidxActivityVersion = '1.7.0'
    androidxAppCompatVersion = '1.6.1'
    androidxCoordinatorLayoutVersion = '1.2.0'
    androidxCoreVersion = '1.10.0'
    androidxFragmentVersion = '1.5.6'
    coreSplashScreenVersion = '1.0.0'
    androidxWebkitVersion = '1.6.1'
    junitVersion = '4.13.2'
    androidxJunitVersion = '1.1.5'
    androidxEspressoCoreVersion = '3.5.1'
    cordovaAndroidVersion = '10.1.1'

    // If you use @capacitor-community/stripe:
+   stripeAndroidVersion = '20.39.+'

    // If you use @capacitor-community/stripe-identity:
+   identityVersion = '20.39.+'

    // If you use @capacitor-community/stripe-terminal:
+   stripeterminalCoreVersion = '3.5.0'
+   stripeterminalLocalmobileVersion = '3.5.0'
  }

Note: @capacitor-community/stripe-terminal does not work with the default sdkVersion, so these updates are mandatory. See /packages/terminal for more information.

Maintainers

Maintainer GitHub Social
Hidetaka Okamoto hideokamoto @hide__dev
Masahiko Sakakibara rdlabo @rdlabo

Contributors ✨

Made with contributors-img.

Demo

Screenshots

@capacitor-community/stripe

Android iOS Web
PaymentSheet
PaymentFlow
ApplePay Not supported beta.
GooglePay Not supported

@capacitor-community/stripe-identity

Android iOS Web
Identity Not supported

stripe's People

Contributors

allcontributors[bot] avatar bryce13950 avatar ccen-stripe avatar danielsogl avatar davidme-stripe avatar dependabot[bot] avatar gerard2perez avatar grzesebe avatar hideokamoto avatar hideokamoto-stripe avatar ihadeed avatar jofftiquez avatar krisloekkegaard avatar mashanz avatar mfix-stripe avatar mortimr avatar nikos9413 avatar orthocube avatar patrickbussmann avatar phal0r avatar rdlabo avatar staff0rd avatar timofey97 avatar yllaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stripe's Issues

Error handling for the confirmSetupIntent

How to handle the error from the Stripe for the confirmSetupIntent?

I have used this as provided in the documentation

const res = await Stripe.confirmSetupIntent({
  clientSecret,
  card: {
      number: '4000000000009995',
      exp_month: 12,
      exp_year: 25,
      cvc: '224',
  },
  redirectUrl: 'https://app.myapp.com', // Required for Android
});

When I use "4000000000009995" test card as per Stripe documentation it will give me error in the response.
In my current implementation it shows unhandled exception and refresh the pages. I am not getting any proper response message from the Stripe.

So my question is how to handle the errors from Stripe from the res object

Missing Stripe POD

Describe the bug
A clear and concise description of what the bug is.
The Stripe Pod is missing from the list of pods to install.
To Reproduce
Steps to reproduce the behavior:
Install the plugin, build the app, and then do npx cap sync

Expected behavior
A clear and concise description of what you expected to happen.
The plugin should include the Stripe Pod by putting its reference into the Podfile
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: iOS
  • Version Latest

Smartphone (please complete the following information):

  • Device: [iPhone X]
  • OS: Latest

Additional context
Here is the error
[error] Error running update: Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Stripe":
In Podfile:
CapacitorCommunityStripe (from ../../node_modules/@capacitor-community/stripe) was resolved to 0.0.1, which depends on
Stripe (= 21.0.1)

Apple pay not working

Thanks for the Plugin.

Current Behaviour

When I do pay with apple pay I am getting the below error.
2021-01-18

Expected Behavior

The error should be more meaningful. rather than just an unable to parse apple pay options, it should say what is the error?
and I am doing everything the same as told in the documentation. So it should works well.

My project Details

`
capacitor-community/stripe: 1.1.0

Ionic:

Ionic CLI : 6.12.3 (/home/joshuva/.nvm/versions/node/v12.20.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.5.2
@angular-devkit/build-angular : 0.1100.7
@angular-devkit/schematics : 11.0.7
@angular/cli : 11.0.7
@ionic/angular-toolkit : 3.0.0

Capacitor:

Capacitor CLI : 2.4.6
@capacitor/core : 2.4.6

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v12.20.0 (/home/joshuva/.nvm/versions/node/v12.20.0/bin/node)
npm : 6.14.10
OS : Linux 5.8

`

Is there no way to confirm a SetupIntent with Google Pay or Apple Pay

Describe the bug
In confirmPaymentIntent, there is an option to set applePayOptions or googlePayOptions so that the PaymentIntent can be paid using Apple Pay or Google Play. However, for subscriptions, confirming SetupIntents is needed, but confirmSetupIntent does not accept Apple Pay or Google Pay options. How is it possible to set up a subscription using Apple Pay and Google Pay?

Expected behavior
I was expecting that confirmSetupIntent would accept applePayOptions and googlePlayOptions

Smartphone (please complete the following information):

  • Device: iPhone / Android
  • OS: Latest
  • Browser: Safari / Chrome
  • Version: Latest

Additional context
We are trying to create a subscription page where a user can subscribe to a subscription using Stripe.

confirmPaymentIntent with PaymentMethod ID and CVC check

I’ve saved my card on Customer after a successfull confirmPaymentIntent, I have 2 questions:

  1. If I retype the same credit card details of one of my saved card, Stripe save the card another time

  2. When i get PaymentMethod list, I need reinsert CVC before confirmPaymentIntent in order to avoid fraud, is it possible?

Update iOS Stripe Pod dependency to 21.0.1

OK, so even further investigation! it seems like there is an incompatibility with the newest version of the stripe library (21.0.1) It seems like there simply needs to be some updates done to the library to make it compatible i.e. change enums like typeCard to card etc. For whatever reason, the capacitor update is not respecting the major version number declared in the pod file, which is thus causing it to write out a pod lock file that has the incompatible version within it.

Originally posted by @bryce13950 in #31 (comment)

identifyCardBrand function always return unknown card type

Describe the bug
identifyCardBrand function always returns an unknown card type. I tried with real cards also but no luck. it always returns an unknown card.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser - Chrome
  • Version - Version 89.0.4389.82 (Official Build) (64-bit)

Additional context
Same problem with validateCardNumber function it always returns card as valid.

[Help]Not able to get the response in code from Stripe

Describe the bug
I am using the Ionic-React project with Stripe integration
When I call createCardToken in the console it is giving the success result in the console but it does not print anything from the response object
Below is my sample code

To Reproduce
Steps to reproduce the behavior:

const handleStripe = async () => {
    const res = await Stripe.createCardToken({
      number: '4242424242424242',
      exp_month: "12",
      exp_year: "2025",
      cvc: '342',
    });
    debugger;
    console.log(JSON.stringify(res));
    console.log(res.card);
    console.log(res.id);
  }

Expected behavior
It should able to give me the params in the response to use it forward in the app

Desktop (please complete the following information):

  • OS: Mac OS

Smartphone (please complete the following information):

  • Device: Android/iOS
  • OS: Android 10/iOS 13.4

It may be some silly mistake, I have tried for a few hours but I am not able to detect the problem

iOS Stripe.payWithApplePay() returns 'unable to parse apple pay options'

I'm trying to call "payWithApplePay" in this way:

                    Stripe.payWithApplePay({
                        applePayOptions: {
                            merchantId: 'merchant.xxx.xxx',
                            country: 'IT',
                            currency: 'EUR',
                            items: [{
                                label: 'my_item_name',
                                amount: '1'
                            }]
                        }
                    }).then((res: any) => {
                        console.log('RES', res);
                    }).catch((e: any) => {
                        console.error('ERROR ', e);
                    });

I'm, ALWAYS getting this response in xCode:

{
  "errorMessage": "Impossibile completare l'operazione. (Errore CapacitorCommunityStripe.StripePluginError 0).",
  "message": "unable to parse apple pay options: Impossibile completare l'operazione. (Errore CapacitorCommunityStripe.StripePluginError 0)."
}

The configuration on Stripe has been made correctly:

Schermata 2021-02-01 alle 15 05 31

Google Pay, instead, works like a charm!

Can anybody help me?

On IOS `confirmPaymentIntent` doesn't return a response.

Describe the bug

On IOS . confirmPaymentIntent doesn't return a response.

To Reproduce

const resultStripe = await this.$stripe.confirmPaymentIntent({
                        clientSecret: this.client_secret,
                        card: {
                            number: this.cc,
                            exp_month: this.valid_month,
                            exp_year: this.valid_year,
                            cvc: this.post,
                        },
                        redirectUrl: 'https://app.myapp.com', // Required for Android
                    })

console.log('RESULT IS : ' + JSON.stringify(resultStripe) )

On android returns a valid json response, with the PI id, etc .

On IOs the printed result is : RESULT IS: {}

Expected behavior

The same thing as Android. Return a valid JSON object with the details of the confirmation.

Capacitor 3 Support

Is your feature request related to a problem? Please describe.
The Capacitor 3 RC is out! 🎉 This library should support the new version

Describe the solution you'd like
Follow the plugin upgrade guide here: https://capacitorjs.com/docs/v3/updating/plugins/3-0

Additional context
The migration is pretty easy, I've done it for a couple plugins. Happy to assist if you need assisting!

PaymentIntent missing from iOS?

Due to the European Law SCA is required, forcing us to use the Paymentintent API.
I noticed it's in the usage examples, however it seems completely missing in iOS

ERROR: Method 'confirmSetupIntent:' not defined in Plugin 'CordovaStripe'

I guess my question is- is iOS WIP? or am I completely missing something?

Crash on user cancelling Google Pay native screen

If the user cancels the google pay method the app crashes with the following error:

Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method > kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter data
at ca.zyra.capacitor.stripe.Stripe.handleOnActivityResult(Unknown Source:2)

Please see my commit for a simple fix:
bolekro@42e229f

validateExpiryDate always returns false on iOS

Describe the bug

Passing a valid expiry date results in valid = false for iOS (correctly returns valid = true on Android)

To Reproduce

Stripe.validateExpiryDate({ exp_month: 12, exp_year: 25 }).then(res => {
    this.expiryStatus = res.valid ? 'OK' : 'Invalid';
});

this.expiryStatus is set to 'Invalid'

Expected behavior

this.expiryStatus should be set to 'OK'.

Smartphone (please complete the following information):

  • Device: iPhone 12 Pro
  • OS: iOS 14.2
  • Browser: Safari
  • Version: 1.1.0

you must provide a valid key

I get "you must provide a valid key" error in the setPlubishableKey catch. I'm using "capacitor-stripe": "^0.4.0"
and my code:
ngOnInit() { this.setPublishKey(); }

async setPublishKey() { await StripePlugin.setPublishableKey('pk_test_XFbXPA2KAKbhaMOllskUKEzx00A3eqpr8y').then((message) => { console.log(message); }).catch((error) => { console.log(error); }); }

What should I do?

Links in the documentation are invalid

Describe the bug
The links on the left of the documentation page (https://capacitor-community.github.io/stripe/) are invalid (Installation and usage examples result in 404).

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://capacitor-community.github.io/stripe/
  2. Click on the links on the left for installation or usage examples

Expected behavior
Links should work

Screenshots
n.a.

Desktop (please complete the following information):

  • Browser Firefox

Smartphone (please complete the following information):
n.a.

Additional context

Type errors in ios build

I have a quasar based (Vue.js) project with which we are using capacitor and stripe. I was very excited to find your plugin as I have not been able to successfully test apple pay on a mobile device due to apple's security restrictions. Unfortunately after I installed the plugin into the project following your installation guide (https://capacitor-community.github.io/stripe/installation/) all ios builds fail. In the terminal I am getting:

`** BUILD FAILED **

The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)

App · ⚠️ Command "xcrun" failed with exit code: 65

⚠️ xcodebuild command failed!`

And if I look at the files in xcode, I see 36 errors during build time, the majority (if not all of them) are listed as type errors. E.g. Cannot find type 'PKPaymentAuthorizationViewControllerDelegate' in scope, Cannot find type 'PKPayment' in scope, etc.

Can you please clarify whether the ios plugin is complete, and if so how to resolve these errors?

Thank you!

Best practice to get card input from user

In the Stripe Web SDK, they are suggesting to use their elements only to take input from the user due to security.
For an app how should we take input from the user, as SDK only provides the method to call Stripe SDK, no option for input

Is everyone using just using the normal input for this?

Stripe is an empty object in IOS

After following the example, I have a working implementation for Stripe in Android - whenever I try to initialize Stripe in IOS, it just doesn't seem to exist. If I log the stripe plugin, it's an empty object.

I can't tell if this is a bug, or if there is any additional configuration needed in ios. It looks like there is documentation for setting up Android, but not ios.

Cannot install via NPM

Describe the bug
I'm not able to install the package via NPM using the command shown in the README.md

To Reproduce
Steps to reproduce the behavior:

  1. Run npm i -S @capacitor-community/stripe in Terminal
  2. Receive below output:
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@capacitor-community%2fstripe - Not found
npm ERR! 404
npm ERR! 404  '@capacitor-community/stripe@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Expected behavior
Should install the package, but instead returns an error

confirmSetupIntent doesn't return data in iOS

This:

Stripe.confirmSetupIntent({
   clientSecret,
   card: {
     number: '4242424242424242',
     exp_month: 12,
     exp_year: 25,
     cvc: '224',
     name: 'asda'
     email: '[email protected]',
   },
   id: clientSecret,
   redirectUrl: 'https://app.myapp.com', // Required for Android
 }).then((result) => {
console.log(result)
 });

It Works perfectly on Android but I don't have any response on iOS (result is an empty object). I'm using Ionic Capacitor. I test this on my Android phone and it worked perfectly, but emulating using Xcode it doesn't work.

How can I solve this?

Thank you so much !

Question: capacitor stripe or cordova stripe

Currently I want to implement an app based on e-scooter sharing (scann QR code -> pay for amount of minutes -> use device).
I am using latest ionic version with capacitor 2.4.0.
Now I am not sure which plugin to use for stripe.
You offer one for cordova and capacitor.
The cordova plugin has many issues and the master was last updated a year ago. Furthermore there is no promise wrapper for the v2 branch which the capacitor plugin has.

I have a few questions about that:

  • Is the cordova plugin compatible with capacitor?
  • Is the capacitor plugin production ready?
  • will you continue to support the cordova plugin or will it be replaced by capacitor in future?
  • which plugin should I use for my project (cordova/capacitor)?

My requirements for the project are:

  • payment with Google Pay and Apple Pay
  • the payment should be done the new way (intents), not token based
  • (optional) pay with credit card without Apple Pay / Google Pay

I am currently not very familiar with the payment procedure. I hope it is ok to ask the question here.
Thanks a lot in advance!

Getting payment method ID from stripe.paymentRequest()

We are trying to implement Apple Pay into our capacitor app. We use Stripe's paymentRequest method to retrieve a payment method ID from Stripe which we then pass onto our API for it to use in completing the charge with Stripe. We have been unable to find a solution that allows us to use Stripe's Apple Pay flow to get a payment method ID without creating a pop up browser.

Will you be incorporating functions that will allow users to access payment method IDs with Stripe's most current functions? Do you have an idea of the timeline for completion?

plugin is not working as it is refering to latest Capacitor version

Describe the bug
The plugin cannot be used after installing due to this error:
Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
[ng] Types of property 'Plugins' are incompatible.
[ng] Property 'Stripe' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.
[ng] 16 export interface CapacitorInstance extends CapacitorGlobal {
[ng] ~~~~~~~~~~~~~~~~~
[ng] ../../node_modules/@capacitor-community/stripe/dist/esm/definitions.d.ts:3:9
[ng] 3 Stripe: StripePlugin;
[ng] ~~~~~~
[ng] 'Stripe' is declared here.

The root cause I suppose is the dependency to the "latest" version of capacitor, which is now 3 since it got released. And apparently the mentioned interface got changed.

To Reproduce
Steps to reproduce the behavior:

  1. Install the plugin
  2. Try to start the application

Expected behavior
Should run ;-)

Additional context
I would propose not to refer to the 'latest' version of a dependency in package.json but being deterministic instead (in this case ^3). And it would be great to have a version compatible with Cap 3. :-)

"No such module 'Stripe3DS2'" for Version 1.1.0

Describe the bug
since @capacitor-community/stripe 1.1.0 i cannot build the app because of an xcode error.

To Reproduce
Steps to reproduce the behavior:

  1. ionic capacitor build ios
  2. build the app in xcode

Expected behavior
app should compile

Screenshots

image

Desktop:

  • OS: Mac OS 10.15.7
  • Browser: Chrome

Smartphone:

  • Device: iPhone 11 Pro
  • OS: IOS 14.2

Allow a Stripe Connect account id to be passed

Currently when creating initiating the plugin I pass the Stripe public key.

import { Plugins } from '@capacitor/core';
const { Stripe } = Plugins;
...
await Stripe.setPublishableKey('pk_test_....');

This works fine.

However I have many customer Stripe accounts connected to my platform Stripe account using Stripe connect.
I have the connectedAccountId for these accounts but not the public Stripe key stored.
Is it possible to initialize the Stripe plugin with my account public key and a stripe connectedAccountId e.g. 'acct_...'?
The same as the Stripe JS SDK does:

 this.stripe = Stripe(environment.stripeMyPublicKey, {
          stripeAccount: connectedStripeAccountId,
        });

Alternatively I guess I could store the public stripe keys for each of the connected accounts but I believe this means I would be placing the charge directly to the connected account and I want to take an application_fee which goes to my platform stripe account.
I am already doing this with the Stripe API without apple pay.

Thanks for the awesome work on this Plugin!

Passing account holder name to Stripe

I've been using your Stripe Cordova plugin for some time now with great results. I'm in the process of migrating my app to Capacitor. I noticed that when requesting a bank account token, it appears the account holder name and account type aren't being passed to the Stripe API. Any plans on adding this in the future? Thanks in advance for your work on this.

Optional billing address with Apple Pay

If it is possible the billing address should be optional with Apple Pay payments

Current behavior
When paying with apple pay a billing address must be sent

Desired behavior
While paying with apple pay the billing address should not be mandatory

No type definitions available in project

Describe the bug
I'm not sure if this is a bug or not, but when i import Stripe to my service i won't get any autocompletion, although I saw in your code that you provide some.

const { Stripe } = Plugins;

This is probably related to this issue.

My current workaround is to import your definitions in my service:

import { StripePlugin } from 'capacitor-stripe/dist/esm/definitions';
const Stripe = Plugins.Stripe as StripePlugin;

Is there any better way to get typesafety or is this the way to go?

Use 2 Publishable key is not possible

How can I use 2 different Publishable key (2 different account Stripe) in the same app?
I’m testing on iOS (but I think it will be so in Android).
They are in different sections but if I set publishablekey then it can't be replaced, but use always the first I set because give me an error on confirmPaymentIntent that it doesn’t find PaymentIntent but server side is ok.
Is there a solution?

in the cordova-plugin-stripe seems to be resolved
zyra/cordova-plugin-stripe#18

3DS Authentication after confirmPaymentIntent

After confirmPaymentIntent I'm receiving in the response:

"id": "pi_*****", "object": "payment_intent", "last_payment_error": null, "livemode": true, "next_action": { "type": "use_stripe_sdk", "use_stripe_sdk": { "type": "three_d_secure_redirect", "stripe_js": "https://hooks.stripe.com/redirect/authenticate/src_*******?client_secret=src_client_secret_*******", "source": "src_********" } }, "status": "requires_action",

In the Stripe's documentation (https://stripe.com/docs/payments/3d-secure#check-status) is explained with 'redirect_to_url' instead of 'use_stripe_sdk'.

Who can help me,please?

Usage on web for dev

I am trying to use while on web localhost but whichever Stripe method i call i get this error :
Stripe does not have web implementation.

I expected to be functional on web for dev purpose, am i missing something or i would have to build app to test it?

  • OS: Linux
  • Browser Chrome
  • Version 1.0.0-beta.4

apple pay fails with unexpected error

i am trying to use apple pay with my ionic project and the code on pay button looks like below

const Stripe = Plugins.Stripe as StripePlugin;
Stripe.setPublishableKey({ key: 'pk_test_XXXXX' }); //test key
const clientSecret: string = 'sk_test_XXXXX'; //test secret

async pay(){
await Stripe.confirmPaymentIntent({
clientSecret,
applePayOptions: {
// options here
merchantId: 'merchant.ixxxxx',
country: 'US',
currency: 'USD',
items: [
{
label: 'Product desc',
amount: 0.5, // amount in dollars
}
]
},
}).then(res => {
// dismiss the apple pay modal in the UI
// check with your server that everything is fine, depending on your PaymentIntent implementation
Stripe.finalizeApplePayTransaction({ success: true })
})
.catch(err => {
console.error("apple pay fail error is", err)
Stripe.finalizeApplePayTransaction({ success: false })
});
}

at runtime i see the error in the code as below

ERROR MESSAGE: {"message":"payment failed: There was an unexpected error -- try again in a few seconds","errorMessage":"There was an unexpected error -- try again in a few seconds"}

i have tried my stripe test as well as live keys but no luck.

Google pay issues

Issue 1

@ihadeed I am having below error when I try to do paywithGooglePay in my app.

let me summarized the steps to reproduce the issue.

When I invoke payWithGooglePay, then an action sheet is opened, followed up with the error alert box pops up.

Request failed:

Unexpected developer error, please try again later.

Please advice, what this means? And also please advice, how to do payment with google pay and apple pay?

issue 2

@ihadeed I have found out the reason for the above error. Please see below

03-09 11:54:24.137 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = AMERICAN_EXPRESS is not a valid enum value for this field.
03-09 11:54:27.606 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = AMERICAN_EXPRESS is not a valid enum value for this field.
03-09 11:54:43.038 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = AMERICAN_EXPRESS is not a valid enum value for this field.


03-09 11:55:14.504 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = UNKNOWN is not a valid enum value for this field.
03-09 11:56:18.973 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = UNKNOWN is not a valid enum value for this field.
03-09 11:56:21.028 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = UNKNOWN is not a valid enum value for this field.
03-09 11:56:24.536 13820 13820 W WalletMerchantError: Error in loadPaymentData: PaymentDataRequest.allowedPaymentMethods[0].parameters.allowedCardNetworks[0] = UNKNOWN is not a valid enum value for this field.

and please advise, why UNKNOWN is not valid enum and Why AMERICAN_EXPRESS, not a valid enum. But these values are present in the enum.

If I put a visa or master card in allowed card networks payment sheet opens without any alert box.

issue 3

@ihadeed Please respond to my queries, I am having a lot of issues with this plugin. I need your clarification and guidance for this.

When I do confirm payment Intent with googlePayOptions, I got below error. I create payment intent from the server. and then passing my client secret to stripe plugin confirm payment intent. But I got the error. Please see the below code and advice.

const stripePublishable = await this.
        cinchSrv.fs.doc$<any>('${environment.appConfig.commerceAccount}/meta/stripe-publishable')
        .pipe(take(1)).toPromise();
      await Stripe.setPublishableKey({ key: stripePublishable.publishableKey });
      await Stripe.confirmPaymentIntent({
        clientSecret: cs,
        googlePayOptions: {
          merchantName: 'test',
          totalPrice: 100,
          totalPriceStatus: 'FINAL',
          currencyCode: 'NOK',
          allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
          allowedCardNetworks: [ 'MASTERCARD', 'VISA'],
        }
"unable to complete transaction: You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method."

I can't able to use payWithGooglePay also, because it return void rather than token response. Please advice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.