Git Product home page Git Product logo

tipsi-stripe's Introduction

🚨 This library is no longer maintained 🚨

If you're building apps with React Native, please use Stripe's official React Native library.

tipsi-stripe

If for some reason you cannot migrate to it now. And you can offer with testing new beta versions, please reach me in discord (name: cybergrind#4625). Just PM with github account name + platforms you can check will be enough. I will ping you when we have something to check.

npm version build status

React Native Stripe binding for iOS/Android platforms

Join our Discord channel to access the beta, to get support from the contributors, and to help us be aware of any issues you find. Here is the invite link: https://discord.gg/vmBxnBw

We'll make notifications on that channel as new beta releases are published, along with sharing documentation and handling questions.

p.s. if you are skilled at writing Appium tests, please raise your hand on the channel!

Cheers!

Documentation

https://tipsi.github.io/tipsi-stripe/docs/index.html

# help us with docs!
npm install docusaurus

# to run docs locally
npm run start-docs

# and open http://localhost:3000/tipsi-stripe/docs/index.html

# upgrade existing docs website in repo
npm run build-docs

Changelog

Full changelog

[9.0.0 - 2021-03-16 Bumped ios sdk and fixed xcode 12.5]

[8.0.0] - 2021-01-16 Breaking changes

[7.0.0] - 2019-01-08 Breaking changes

[6.0.0] - 2018-10-24 Breaking changes

[5.0.0] - 2018-03-21 Breaking changes

Documentation

https://tipsi.github.io/tipsi-stripe/

# help us to upgrade docs locally
npm run start-docs

# upgrade existing docs website in repo
npm run build-docs

Community

Discord

License

tipsi-stripe is available under the MIT license. See the LICENSE file for more info.

tipsi-stripe's People

Contributors

acatalina avatar ajaykumar97 avatar andrepcg avatar bramski avatar charlestr avatar cybergrind avatar dallen4 avatar deermichel avatar densa avatar dmytrozavgorodniy avatar fans1k avatar fbartho avatar fiznool avatar idris avatar igor-lemon avatar isnifer avatar jhihruei avatar maxhungry avatar mindlapse avatar nepherhotep avatar ngoryachev avatar nobodyabcd avatar olliebennett avatar paynd avatar philipgraf avatar secobarbital avatar sergeyzhukov avatar shamilovtim avatar theohdv avatar yassinecc 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tipsi-stripe's Issues

ios build issue

btw, im running on react-native v0.38

all i get when running react-native run-ios
is this error

CompileC /Users/user/repos/sample-mobile/ios/build/Build/Intermediates/TPSStripe.build/Debug-iphonesimulator/TPSStripe.build/Objects-normal/x86_64/TPSCardFieldManager.o TPSStripe/TPSCardFieldManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

createTokenWithCard() does not return card property on android

In my Component, I have the following simplified handler for <PaymentCardTextField />

  handleSubmit = () => {
    stripe
      .createTokenWithCard(draftPayment)
      .then(response => {
        console.log(response)
      })
  };

The response object above contains the following on android

{
  tokenId: 'tok_19GCAQI5NuVQgnjeKNE32K0p',
  livemode: false,
  user: false 
}

But on iOS, it contains all the keys described in the docs

{
  tokenId: 'tok_19GCAQI5NuVQgnjeKNE32K0p',
  created: 1479236426,
  livemode: 0,
  card: {
    cardId: 'card_19GCAQI5NuVQgnjeRZizG4U3',
    brand: 'Visa',
    funding: 'credit',
    last4: '4242',
    ...
  }
}

Because the card property is missing, I am getting errors on the android app. However, this does not seem to be the case on iOS

Android deprecation warnings

https://travis-ci.org/tipsi/tipsi-stripe/builds/179024761

11:36:45.670 [ERROR] [system.err] /home/travis/build/tipsi/tipsi-stripe/example/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:98: warning: [deprecation] onActivityResult(int,int,Intent) in BaseActivityEventListener has been deprecated

11:36:45.670 [ERROR] [system.err]           super.onActivityResult(requestCode, resultCode, data);

11:36:45.670 [ERROR] [system.err]                ^

11:36:45.674 [ERROR] [system.err] /home/travis/build/tipsi/tipsi-stripe/example/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:148: warning: [deprecation] reject(String) in Promise has been deprecated

11:36:45.675 [ERROR] [system.err]           promise.reject(error.getMessage());

11:36:45.675 [ERROR] [system.err]                  ^

11:36:45.685 [ERROR] [system.err] /home/travis/build/tipsi/tipsi-stripe/example/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:195: warning: [deprecation] reject(String) in Promise has been deprecated

11:36:45.685 [ERROR] [system.err]                     payPromise.reject("Android Pay unavaliable");

11:36:45.685 [ERROR] [system.err]                               ^

11:36:45.686 [ERROR] [system.err] /home/travis/build/tipsi/tipsi-stripe/example/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:201: warning: [deprecation] reject(String) in Promise has been deprecated

11:36:45.686 [ERROR] [system.err]                   payPromise.reject("Error making isReadyToPay call");

11:36:45.686 [ERROR] [system.err]                             ^

11:36:45.687 [ERROR] [system.err] /home/travis/build/tipsi/tipsi-stripe/example/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:179: warning: [deprecation] isReadyToPay(GoogleApiClient) in Payments has been deprecated

11:36:45.687 [ERROR] [system.err]           Wallet.Payments.isReadyToPay(googleApiClient).setResultCallback(

11:36:45.687 [ERROR] [system.err]                          ^

11:36:45.978 [ERROR] [system.err] 5 warnings

Build failed with an exception

Please help! Build is failing with the stack trace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':tipsi-stripe:compileReleaseJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:48)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:104)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:53)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:163)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:127)
at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:49)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)

StripeModule.paymentRequestWithCardForm expects 3 arguments

When I call stripe.paymentRequestWithCardForm(), it errors out, saying StripeModule.paymentRequestWithCardForm got 2 arguments, expected 3.

This comes from invoke in BaseJavaModule.java:291 (top-most entry in the stack trace). I checked StripeModule.java in my node_modules folder, but the paymentRequestWithCardForm method seems to rightfully take in 2 arguments.

I'm testing on a physical device running Android 4.4.4. My dev environment is running React Native 0.39, with [email protected].

I'm at a loss. Where could this be coming from?

ios: install without cocoa pods

Hi guys,
thank you for the amazing project. I am using it successfully in my Android react-native build.
Now I am working on the ios and I am facing huge problems making all the dependencies right, not just because of the installation of this library.
As far as I understand using pods requires you to open xcode from proj.xcworkspace rather than proj.pbxproj, which for a newbie is a gotcha that doesn't come naturally. Then it is not clear which files need to be committed and which ones need to be ignore. There are debates in the community itself about this topic. And I find out that other react-native libraries don't use pods - at least the other 12 I am using - it seems to me that the installation of these other libraries conflicts with this one, because every time I execute a react-native link * command the code doesn't compile anymore. I received lots of different errors, but the last error I can see today is:

diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

It would be great if you could shed some lights and help me understand what would be the best practise to include this library on iOS so that it doesn't conflict with others, or at least is intuitive for newbies.

Thanks again

Android not compiling (lib 1.4.0)

lib version 1.4.0 (I am not sure if this bug affects also version 2.0.0)
react-native 0.38.0

JAVA version

/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_121"

Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

:app:dexDevDebug
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexIndexOverflowException: Cannot merge new index 66024 into a non-jumbo instruction!
Unknown source file : 	at com.android.dx.merge.InstructionTransformer.jumboCheck(InstructionTransformer.java:109)
Unknown source file : 	at com.android.dx.merge.InstructionTransformer.access$800(InstructionTransformer.java:26)
Unknown source file : 	at com.android.dx.merge.InstructionTransformer$StringVisitor.visit(InstructionTransformer.java:72)
Unknown source file : 	at com.android.dx.io.CodeReader.callVisit(CodeReader.java:114)
Unknown source file : 	at com.android.dx.io.CodeReader.visitAll(CodeReader.java:89)
Unknown source file : 	at com.android.dx.merge.InstructionTransformer.transform(InstructionTransformer.java:49)
Unknown source file : 	at com.android.dx.merge.DexMerger.transformCode(DexMerger.java:842)
Unknown source file : 	at com.android.dx.merge.DexMerger.transformMethods(DexMerger.java:813)
Unknown source file : 	at com.android.dx.merge.DexMerger.transformClassData(DexMerger.java:786)
Unknown source file : 	at com.android.dx.merge.DexMerger.transformClassDef(DexMerger.java:682)
Unknown source file : 	at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:542)
Unknown source file : 	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file : 	at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file : 	at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file : 	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file : 	at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : 	at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : 	at com.android.dx.command.Main.main(Main.java:106)

:app:dexDevDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dexDevDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

It seems related to this https://developer.android.com/studio/build/multidex.html

adding multiDexEnabled true fixes the problem but maybe there are ways to reduce the number of methods that this library imports

android {
    defaultConfig {
        ...
        minSdkVersion 21 
        targetSdkVersion 25
        multiDexEnabled true
    }
    ...
}

UPDATE

maybe upgrading the latest stripe-android dependency could reduce the load:
https://github.com/stripe/stripe-android/blob/master/CHANGELOG#L14

paymentRequestWithCardForm Crashing App

I am running into an issue when I try to call paymentRequestWithCardForm. I get the following error, which crashes my app.

'*** -[__NSCFConstantString stringByAppendingString:]: nil argument' was thrown while invoking paymentRequestWithCardForm on target TPSStripeManager with params (
        {
        requiredBillingAddressFields = full;
        smsAutofillDisabled = 1;
        theme =         {
        };
    },
    70,
    71
)

Function Invocation

handleCardPayPress = async () => {
      try {
        this.setState({
          loading: true,
          token: null,
        })
        console.log(stripe,'inner stripe');
        const token = stripe.paymentRequestWithCardForm({
          // Only iOS support this options
          smsAutofillDisabled: true,
          requiredBillingAddressFields: 'full',
          prefilledInformation: {
            billingAddress: {
              name: 'Gunilla Haugeh',
              line1: 'Canary Place',
              line2: '3',
              city: 'Macon',
              state: 'Georgia',
              country: 'US',
              postalCode: '31217',
              email: '[email protected]',
            },
          },
        })

How I call it

                <ARButton
                    style={[styles.changeBtn,styles.btn]}
                    title="CHANGE PAYMENT INFORMATION"
                    type={2}
                    onPress={this.handleCardPayPress}
                    // onPress={()=>this.props.navigation.navigate('PaymentInfo')}
                />

Name not showing up in token for Apple Pay

I'm trying to use tipsi-stripe with apple pay. I'm not seeing the name:


      stripe.paymentRequestWithApplePay(
        helpers.applePayFormat(cartItems),
        {},
      )
      .then(token => {
        console.log("tokennnnnnnnnnnnnnnnnnnnnnnnn: ", token);
        ...
        stripe.completeApplePayRequest();
      })
      .catch(error => {
        console.log(error);
      });

this prints out:


'tokennnnnnnnnnnnnnnnnnnnnnnnn: ', { livemode: false,
  created: 1487648584,
  card: 
   { cardId: 'card_19pUYNCV51Zcg8T4miMFvgFn',
     funding: 'credit',
     country: 'US',
     expMonth: 12,
     brand: 'Visa',
     last4: '0000',
     expYear: 2020,
     dynamicLast4: '4242' },
  tokenId: 'tok_19pUYOCV51Zcg8T4fxBLN15G',
  extra: 
   { shippingContact: null,
     shippingMethod: null,
     billingContact: null } }

Is this because I'm not in livemode?

input file must be a fat file when the -extract option is specified

Hi,

Thank you for providing such a great library.

I've tried to setup this lib with my react-native app and I've got 'input file must be a fat file when the -extract option is specified' error.

Initially, while setting up, I faced the error mentioned in the issue below (Stripe/Stripe.h file not found).

#29

Since our app still has some dependency on libraries, which doesn't support RN v0.40.0 breaking changes, our app uses RN v0.39.2. Hence, I use tipsi-strip v1.4.0 and apply the fix suggested in the issue. (add Library Search Path and Add Stripe.framework at Link Binary With Libraries)

Then, the error above stopped showing up, instead I got the error below.

fatal error: lipo: input file (xxxxxxxxxxxxxxxxxxxxxx/Build/Products/Debug-iphonesimulator/app_name.app/Frameworks/Stripe.framework/Stripe) must be a fat file when the -extract option is specified

Do you have any idea why this happens and how I can solve this?

My environments are as below:

RN v0.39.2
tipsi-strip v1.4.0
Xcode 8.2.1

My Podfile looks like this:

platform :ios, '8.1'
use_frameworks!

target 'app_name' do
  pod 'Crashlytics'
  pod 'Fabric'
  pod 'Stripe', '~> 9.2.0'

  inherit! :search_paths
end

IOS build error "no visible @interface" for "setBillingAddress".

Error:

I get the following build error in Xcode:

no visible @interface for 'STPUserInformation' declares the selector 'setBillingAddress:'

on line 597 of TPSStripeManager.m

Steps to reproduce

I had Tipsi-Stripe installed and working correctly on a version prior to 3.10 (I installed originally around the middle of May). After the Ios bank account tokenization was merged I updated the library, and encountered build failures on IOS. However the library is working as expected on Android.

Debugging Steps Taken:

I have

  • upgraded react-native
  • cleared the build cache
  • deleted and re-installed /re-linked my node-modules.
  • re-run pod install

I can't think of anything else to try, but it seems like an issue local to my system, since other people haven't reported it.

I would appreciate any help debugging this issue.

Create source from token (question)

Hi,
Thanks for the great library! This is a question rather than an issue. I'm trying to use this to create a payment source to charge with a subscription. I'm trying to follow the pattern of not using the card details on the backend, so I'm wondering if I can use a reference to the token created by one of the three methods of this library and add it as a source?
That being the case, I'm jsut wondering what elements of the response token I actually use. For example there are some discrepencies I noticed in variable names between the form the API accepts and what gets returned by this library e.g 'id' vs 'cardId' and expYear vs exp_year etc.
Any advice on this would be great, and then maybe I could help add it into the docs? Thanks

Edit: Closed, I didn't realise you just need the tokenId, I'm a stripe newbie sorry!

NSPersonNameComponentsFormatter not supported in iOS 8.0

I am getting the following error when trying to run my app on an iPhone 4s iOS 8.3 simulator:

dyld: Symbol not found: _OBJC_CLASS_$_NSPersonNameComponentsFormatter
  Referenced from: /Users/ben/Library/Developer/CoreSimulator/Devices/2C531502-13CE-4298-80A7-692D7661AFD4/data/Containers/Bundle/Application/15795C11-DE78-4662-AB4B-359CF99CCC45/MyAPP.app/MyAPP
  Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
 in /Users/ben/Library/Developer/CoreSimulator/Devices/2C531502-13CE-4298-80A7-692D7661AFD4/data/Containers/Bundle/Application/15795C11-DE78-4662-AB4B-359CF99CCC45/MyAPP.app/MyAPP
(lldb) 

It seems to be related to this line as the app runs fine when it is removed and the PersonNameComponentsFormatter seems to have a minimum sdk of 9.0+

Is there any chance this can be reworked to support iOS 8.0+ ? Related to #41

post_install.sh fails on `require 'xcodeproj'`

When running react-native-link I get the following error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/scottantipa/dev/GiveCrewNative/node_modules/tipsi-stripe/scripts/post-link-ios.rb:3:in `<main>'

This causes a build failure when running on iOS.

To get around this I

  1. manually installed the xcodeproj gem that the post_install script was trying to require
  2. re-ran the post_install script

This seemed generated a Podfile and seemed to properly install Stripe, although I'm still having issues related to #29

linking problem

Greetings.
After installing and linking the library, when i try to run the project via react-native, I have the same issue as #53 . However, if i run it via xcode, it works just fine.
It's linked by react-native link. I've checked the project settings, and they are all modified just as described in the manual steps .
Do you have any idea what else i should check?
I'm using the latest version of react native cli, xcode, and tipsi-stripe.
Thank you.

Can I please get quick advice on the status of android pay support

I see that android pay is described as 'under active development' and that in an issue from December it was described as 'Currently, Android Pay support is not ready for production since it under active development'

I am just curious as to the likely timeframce (any general guide would be helpful) for when it 'might' be production-ready. Thanks for you work on this lib, it seems great so far!

Windows Android Link Error

The 2.2.1 build fails when trying to do react-native link tipsi-stripe with the following error on Windows:

rnpm-install ERR! It seems something went wrong while linking. Error: spawn UNKNOWN
Please file an issue here: https://github.com/facebook/react-native/issues

Removing the following lines from package.json (in "rnpm/commands") seems to resolve it, but you still have to do the maven entry for jitpack.io

"prelink": "node_modules/tipsi-stripe/scripts/pre-link.sh",
"postlink": "node_modules/tipsi-stripe/scripts/post-link.sh"

Android misspelling

This project looks great! Just would make it look a bit more professional if the few misspellings of Android were fixed here (just go to the below link and ctrl-F for 'andriod')
https://github.com/tipsi/tipsi-stripe

Hope that helps :) Thanks for writing the only RN wrapper that supports ios and android.

undefined is not an object (evaluating 'TPSStripeManager.init')

This is my test data

 Stripe.init({
            publishableKey: 'pk_test_xxxxxxxxxxxxxxxx',
            merchantId: null,
        });
        Stripe.createTokenWithCard({
            number: 4242424242424242,
            expMonth: 10,
            expYear: 19,
            cvc: 345,
        }).then((token) => {
            console.log(token)
        });

import Stripe from 'tipsi-stripe'

I am having this issue in the iOS simulator.

on Android: Execution failed for task ':tipsi-stripe:processReleaseResources'

When I try to run my android project with tipsi-stripe, I get:

$ react-native run-android
Scanning 571 folders for symlinks in <project-home>/node_modules (3ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
<... bunch of other modules ...>
:tipsi-stripe:preBuild UP-TO-DATE
:tipsi-stripe:preReleaseBuild UP-TO-DATE
:tipsi-stripe:compileReleaseNdk UP-TO-DATE
:tipsi-stripe:compileLint
:tipsi-stripe:copyReleaseLint UP-TO-DATE
:tipsi-stripe:checkReleaseManifest
:tipsi-stripe:preDebugAndroidTestBuild UP-TO-DATE
:tipsi-stripe:preDebugBuild UP-TO-DATE
:tipsi-stripe:preDebugUnitTestBuild UP-TO-DATE
:tipsi-stripe:preReleaseUnitTestBuild UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportAnimatedVectorDrawable2501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportAppcompatV72501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportCompat2501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportCoreUi2501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportCoreUtils2501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportFragment2501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportMediaCompat2501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportV42501Library UP-TO-DATE
:tipsi-stripe:prepareComAndroidSupportSupportVectorDrawable2501Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFrescoDrawee101Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFrescoFbcore101Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFrescoFresco101Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFrescoImagepipeline101Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFrescoImagepipelineBase101Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookFrescoImagepipelineOkhttp3101Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookReactReactNative0440Library UP-TO-DATE
:tipsi-stripe:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:tipsi-stripe:prepareComGithubThefuntastyCreditCardEntry1484Library UP-TO-DATE
:tipsi-stripe:prepareComGoogleAndroidGmsPlayServicesBase1024Library UP-TO-DATE
:tipsi-stripe:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE
:tipsi-stripe:prepareComGoogleAndroidGmsPlayServicesIdentity1024Library UP-TO-DATE
:tipsi-stripe:prepareComGoogleAndroidGmsPlayServicesMaps1024Library UP-TO-DATE
:tipsi-stripe:prepareComGoogleAndroidGmsPlayServicesTasks1024Library UP-TO-DATE
:tipsi-stripe:prepareComGoogleAndroidGmsPlayServicesWallet1024Library UP-TO-DATE
:tipsi-stripe:prepareComStripeStripeAndroid210Library UP-TO-DATE
:tipsi-stripe:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:tipsi-stripe:prepareReleaseDependencies
:tipsi-stripe:compileReleaseAidl UP-TO-DATE
:tipsi-stripe:compileReleaseRenderscript UP-TO-DATE
:tipsi-stripe:generateReleaseBuildConfig UP-TO-DATE
:tipsi-stripe:generateReleaseAssets UP-TO-DATE
:tipsi-stripe:mergeReleaseAssets UP-TO-DATE
:tipsi-stripe:generateReleaseResValues UP-TO-DATE
:tipsi-stripe:generateReleaseResources UP-TO-DATE
:tipsi-stripe:mergeReleaseResources UP-TO-DATE
:tipsi-stripe:processReleaseManifest UP-TO-DATE
:tipsi-stripe:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tipsi-stripe:processReleaseResources'.
> at index 4

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 10.291 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
$ adb devices
List of devices attached
ZY223KDRZQ	device

There is a device attached and it works without the tipsy-stripe module. What am I missing/doing wrong?

deviceSupportsAndroidPay?

Awesome work on the library!
I haven't really done much with Android, but Is there a way to have deviceSupportsAndroidPay?

-Sam

workaround for using 'use_frameworks!'

I met same error with #11 and found how to workaround this issue. So please let me share that on here.

Issue:

  • when uncomment use_frameworks! in Podfile, build fails with message below. (even it worked without use_frameworks! before)
fatal error: 'Stripe/Stripe.h' file not found`
#import <Stripe/Stripe.h>
        ^
1 error generated.

Solution:

  1. Click TPSStripe.xcodeproj in the project navigator and go the Build Settings tab.
  2. Look for Framework Search Paths and make sure it contains $BUILD_DIR/$CONFIGURATION$EFFECTIVE_PLATFORM_NAME/Stripe
  3. Change to the Build Phases, and in the section Link Binary with Libraries click the + and add Stripe.framework.

Setup Apple Pay requirement

Hello πŸ‘‹ ,

Currently, Apple deem it necessary if a device that supports Apple Pay and the user hasn't setup a payment card to show a "Setup Apple Pay" button. I can't see that this library offers the facility to check if a user has setup a card or not.

It'd be brilliant if it could, because as a whole tipsi-stripe is amazing but is missing this one little thing that could stop a lot of people from using it.

If you look at react-native-stripeβ€˜s example they are able to check the whether the user has a card or not and provide the facility to open the native view to setup a card on iOS. I believe this is the native code used to "link" users offer to payment setup screen.

Would this be something you'd look to implement?

'Stripe/Stripe.h' file not found

Hi,

I am getting this error while building the application in xcode: 'Stripe/Stripe.h' file not found

I have integrated this package manually in xcode.

here is the screenshot:
screen shot 2016-12-17 at 12 30 23 pm

How to charge card after getting token

Hi
I am trying to work out how you actually charge the card after the token is return from stripe.

I have tried to use but get error about .create function

// Charge the user's card:
var charge = stripe.charges.create({
amount: 1000,
currency: "aud",
description: "Example charge",
metadata: {order_id: 6735},
source: token,
}, function(err, charge) {
// asynchronously called
});

Error: Maximum call stack size exceeded

I get the following error when trying to run react-native link tipsi-stripe

Scanning 713 folders for symlinks in /Users/ben/Projects/Test/node_modules (6ms)
Preparing to link tipsi-stripe for iOS
Checking CocoaPods...
CocoaPods already installed
rnpm-install info Linking tipsi-stripe android dependency
rnpm-install info Android module tipsi-stripe has been successfully linked
rnpm-install ERR! Something went wrong while linking. Error: Maximum call stack size exceeded
Please file an issue here: https://github.com/facebook/react-native/issues

Maximum call stack size exceeded

If I try to manually Add Files to "Your Project Name" then Xcode crashes...

External (Bank) Account Support

Fantastic library!

Have you thought of including support for tokenizing external accounts like bank accounts or debit cards?

Thanks!

iOS build Fails 'Stripe/Stripe.h' not found..

I am able to build on android but in iOS its fails everytime...
tried with react-native link and also manually as said in ReadMe but still facing this error...

Terminal:
ss

Xcode:
screen shot 2017-04-20 at 5 43 57 pm

podFile:
screen shot 2017-04-20 at 5 46 18 pm

Versions:
React: 15.4.1
ReactNative : 0.42.3
Xcode: 8.3
iOS: 10.0
pod: 1.2.1

createTokenWithCard crashing app

Device
Running on device
iOS 10.3.1, iPhone 7

Behavior
App crashes as soon as the createTokenWithCard method is run. I have verified several times that the properties are defined correctly.

Initializing

await Http.get('/payments/stripe/key').then(({ data }) => {
   stripe.init({
      publishableKey: data.publishable_key,
   });
});

In a change handler

if (form.valid) {
      const { number, cvc, expiry } = form.values;
      let [expMonth, expYear] = expiry.split('/');

      stripe.createTokenWithCard({
        number,
        expMonth: parseInt(expMonth),
        expYear: parseInt(expYear),
        cvc,
      }).then((token) => {
        console.log(token)
      });
}

NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest

I'm running react-native v0.40.0 with tipsi-stripe 1.4.0 and can't get around the following error

adb logout output:
I/art (25295): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.wallet.MaskedWalletRequest> E/ReactNativeJS(25295): C++ Exception in 'NativeModules': java.lang.NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest

I've cleared my gradle cache, tried to install all related dependancies but have been unsuccessful.

Has anyone hit this before?

Unable to supply custom font

Hi
I was looking at a way to achieve a custom font with the standard card form, but haven't been able to work this out using the theme options
Thanks

Native component for "TPSCardField" does not exist

I followed the instructions from the readme and got this. Only thing i can think of is I didn't move the folder into the correct location? I put it under the directory.

EDIT:
Turns out I needed to reset the RN server

Android pay not available

I was using react-native-billing for android pay, which was working fine on my device, but when i'm using this plugin android pay isn't available?

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.