#lucky-trader_api

1 messages · Page 1 of 1 (latest)

desert oracleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1372804485528817726

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

north oak
#

Hi, @wheat badger

desert oracleBOT
north oak
#

I created a payment intention on the backend api with blik as a payment method, and I want to confirm it on the react native side.
BUt there's no way to confirm with with blik code

wheat badger
#

Hi @north oak I’ll get back to you later

north oak
#

Hi, @carmine quail

desert oracleBOT
north oak
#

Hi, @neon grotto

neon grotto
#

Hi there, catching up

#

I think we met before 🙂 And yes you can implement PaymentSheet on ReactNative, which should support Blik

north oak
#

But payment sheet does not show Blik payment method

#

I tried it

#

check this out

#

This is the payment intent

{
  id: 'pi_3RPGTDQOB1mXSy4a0zFV5A7K',
  object: 'payment_intent',
  amount: 3100,
  amount_capturable: 0,
  amount_details: { tip: {} },
  amount_received: 0,
  application: null,
  application_fee_amount: null,
  automatic_payment_methods: { allow_redirects: 'never', enabled: true },
  canceled_at: null,
  cancellation_reason: null,
  capture_method: 'automatic_async',
  client_secret: 'pi_3RPGTDQOB1mXSy4a0zFV5A7K_secret_1j8QXzB99Pbol81YYsr8KrhAk',
  confirmation_method: 'automatic',
  created: 1747371967,
  currency: 'pln',
  customer: 'cus_SJttlzrvbmXhiF',
  description: 'Payment for book id BK-DRUB8N8EU0',
  last_payment_error: null,
  latest_charge: null,
  livemode: false,
  metadata: {},
  next_action: null,
  on_behalf_of: null,
  payment_method: null,
  payment_method_configuration_details: { id: 'pmc_1RLiJaQOB1mXSy4aobozc0Um', parent: null },
  payment_method_options: {
    blik: {},
    card: {
      installments: null,
      mandate_options: null,
      network: null,
      request_three_d_secure: 'automatic'
    },
    link: { persistent_token: null }
  },
  payment_method_types: [ 'card', 'blik', 'link' ],
  processing: null,
  receipt_email: null,
  review: null,
  setup_future_usage: null,
  shipping: null,
  source: null,
  statement_descriptor: null,
  statement_descriptor_suffix: null,
  status: 'requires_payment_method',
  transfer_data: null,
  transfer_group: null
}
#

But this is what I get when I present payment sheet

neon grotto
#

The PI does have

  payment_method_types: [
    "card",
    "blik",
    "link",
  ],

though

north oak
#

yeah

#

same for Android

neon grotto
#

Did you configure a redirect url?

north oak
#

yes

neon grotto
north oak
#

      const { error } = await initPaymentSheet({
        merchantDisplayName: reservation.court.club.title,
        applePay: {
          merchantCountryCode: purchaseDetail.merchantCountryCode ?? "PL",
          cartItems: [
            {
              label: purchaseDetail.carts.label,
              amount: (purchaseDetail.carts.amount * 1).toString(),
              paymentType: PlatformPay.PaymentType.Immediate,
            },
          ],
        },
        googlePay: {
          testEnv: Config.STRIPE_TEST,
          merchantCountryCode: purchaseDetail.merchantCountryCode ?? "PL",
          currencyCode: purchaseDetail.currency ?? "PLN",
          label: purchaseDetail.carts.label,
          amount: (purchaseDetail.carts.amount * 100).toString(),
        },
        intentConfiguration: {
          mode: {
            amount: Math.round(payAmount * 100),
            currencyCode: reservation.court.club.currency || "PLN",
          },
          confirmHandler: confirmHandler,
        },
        returnURL: "neopadel://payment/stripe",
      })

      if (error) {
        console.log("Error initializing payment sheet:", error)
      }
    }
neon grotto
#

Alright, how about handleURLCallback as the Doc link above mentioned

north oak
#

where can I config it?

#

oh

#

one moment

#

@neon grotto
Same

#

it still does not show the blik option

neon grotto
#

Okie can you share the full code?

north oak
neon grotto
#

Um I still haven't seen handleURLCallback in this file. Do you define it somewhere else?

north oak
#

yeah

#

AppContext, which embeds the above component

neon grotto
#

Alright, have you also done step 1 and 2 here?

  1. Register a custom URL. Universal links aren’t supported.
  2. Configure your custom URL.
#

From the Doc

north oak
#

Yes

neon grotto
#

Could you show the Xcode settings for 1?

north oak
#

as you can see, there's com.neopadel schema added

neon grotto
#

Your PI uses neopadel so that's more important. But okie

#

I am not familiar with neopadel, com.neopadel works. Could you split them out to 2 different entries?

north oak
#

ok, its bulding now, takes some time

#

btw, is there anyw ay to confirm the blik code directly on react native without using payment sheet?

neon grotto
#

No, only PaymentSheet for now

north oak
#

Why do I receive this error when paying with test card?

#

Apple pay works, but card does not work

#

this is the intent

  id: 'pi_3RPHF6QOB1mXSy4a17nMkV3p',
  object: 'payment_intent',
  amount: 16600,
  amount_capturable: 0,
  amount_details: { tip: {} },
  amount_received: 0,
  application: null,
  application_fee_amount: null,
  automatic_payment_methods: { allow_redirects: 'never', enabled: true },
  canceled_at: null,
  cancellation_reason: null,
  capture_method: 'automatic_async',
  client_secret: 'pi_3RPHF6QOB1mXSy4a17nMkV3p_secret_JEM9iHLh3nYBN9k3247OHdhuh',
  confirmation_method: 'automatic',
  created: 1747374936,
  currency: 'pln',
  customer: 'cus_SJtuoT8UHijVIa',
  description: 'Payment for book id BK-DRUB8N8EU0',
  last_payment_error: null,
  latest_charge: null,
  livemode: false,
  metadata: {},
  next_action: null,
  on_behalf_of: null,
  payment_method: null,
  payment_method_configuration_details: { id: 'pmc_1RLiJaQOB1mXSy4aobozc0Um', parent: null },
  payment_method_options: {
    blik: {},
    card: {
      installments: null,
      mandate_options: null,
      network: null,
      request_three_d_secure: 'automatic'
    },
    link: { persistent_token: null }
  },
  payment_method_types: [ 'card', 'blik', 'link' ],
  processing: null,
  receipt_email: null,
  review: null,
  setup_future_usage: null,
  shipping: null,
  source: null,
  statement_descriptor: null,
  statement_descriptor_suffix: null,
  status: 'requires_payment_method',
  transfer_data: null,
  transfer_group: null
}
wheat badger
#

Hi @north oak I'm taking over this thread. give me a sec to catch up

#

Ok, so looks like you are using the deferred intent creation flow, and you need to make sure the params that you pass to initPaymentSheet match with the params that you use to create a PaymentIntent

north oak
#

For this, I used exactly the same

#

Apple pay and google pay works, but only direct card pay throws an error

wheat badger
#

Can you check with you latest react-native code and see if you specify automatic for captureMethod?

north oak
#

the latest react native throws a build error on android

#
e: This version (1.3.2) of the Compose Compiler requires Kotlin version 1.7.20 but you appear to be using Kotlin version 1.9.25 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).

#

many users are complaining about this on the github

wheat badger
north oak
#

let me give a try

#

building on android now

#

in 0.46.0, is it possible to confirm the PI with blik code directly without using payment sheet?

#

@wheat badger

wheat badger
#

I don't see a BlikParams for the confirmPayment function, so I don't think you can confirm a blik PI without using PaymentSheet.

north oak
#

is there any separate bank app to be installed to use BLIK payment in stripe?

wheat badger
north oak
#

Ok

#

Besides that

#

the build error on android

wheat badger
#

The error stack doesn't really provide much useful info.

#

Have you tried cleaned the node_modules and cleared the Android project cache?

north oak
#

let me try that

#
w: file:///Users/administrator/Documents/kai/padelapp-monorepo/mobile-app/node_modules/expo-modules-autolinking/android/expo-gradle-plugin/expo-autolinking-plugin-shared/build.gradle.kts:32:9: The expression is unused

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/administrator/Documents/kai/padelapp-monorepo/mobile-app/android/build.gradle' line: 12

* What went wrong:
A problem occurred evaluating root project 'NeoPadel'.
> Could not get unknown property 'kotlinVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
#

This is app.config.ts

north oak
#

Is it possible to confirm with blik using useEmbeddedPaymentElement?

#

@wheat badger

wheat badger
#

The embedded payment sheet should support the same list of payment methods that payment sheet supports

north oak
#

ok

#

i'll try that