Skip to content

Why I'm stuck on add credit card screen. #544

Description

@ramangupta1602

Hi @yatatsu,

Why I'm stuck on add credit card screen, why I don't get token after this process, using the latest version of the package and the version of react-native@0.72.3
Screenshot_1725509624

and the code is:----

  1. PayjpCore.init({
    publicKey: PAY_JP_PUBLIC_KEY_TEST,
    }).then(() => {
    console.log('Prod',PAY_JP_PUBLIC_KEY_TEST);
    }).catch((error) => {
    console.error('Error initializing PayjpCore:', error);
    });

  2. onPressAddCard = () => {
    PayjpCardForm.startCardForm()
    }

  3. const unsubscribePayjpForm = PayjpCardForm.onCardFormUpdate({
    onCardFormProducedToken: async token => {
    console.log('onCardFormProducedToken', token);

       return PayjpCardForm.completeCardForm()
     } catch (exception) {
       return PayjpCardForm.showTokenProcessingError('An error has occured')
     }
    

    }
    })

PayjpCore.init() this is working fine but I'm stuck here onCardFormUpdate

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions