#priya_code

1 messages · Page 1 of 1 (latest)

turbid fractalBOT
#

👋 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/1342039487601049622

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

last moth
#

Could you share an example Payment Intent (pi_...), so that I can take a look on how your integration works?

silver valve
#

Sure,will share you

#

pi_3QuUYVHGEu8wlVR01TrS0clK

on above payment intent id was confirmed but not captured , in this stage we get card details mentioned below , after confirmation we want to update the transaction charge

logs:

confirmPaymentIntent succeeded: <SCPPaymentIntent: 0x303c9be40; amount = 300; amount_details = <SCPAmountDetails: 0x3000cb7c0; tip = <SCPTip: 0x3000cb800; amount = (null)>>; amount_tip = (null); capture_method = manual; currency = gbp; created = 2025-02-20 7:52:23 am +0000; charges = (
"<SCPCharge: 0x30223c770; amount = 300; calculatedStatementDescriptor = FUSION KITCHEN; currency = gbp; metadata = {\n}; paymentMethodDetails = <SCPPaymentMethodDetails: 0x3018c90b0; cardPresent = <SCPCardPresentDetails: 0x303ee8790; brand = visa; funding = credit; last4 = 9969; cardholderName = CARDHOLDER/VISA; expMonth = 3; expYear = 2023; generatedCard = (null); incrementalAuthorizationStatus = not supported; receipt = <SCPReceiptDetails: 0x3028c0000; accountType = credit; authorizationCode = 123456; authorizationResponseCode = 3030; dedicatedFileName = A000000003101001; applicationPreferredName = Stripe Credit; applicationCryptogram = 7A3AC13EF8B092F5; terminalVerificationResults = 0000000000; transactionStatusInformation = 0000>; emvAuthData = 8A023030; networks = (null); network = visa; issuer = Celtic Bank; description = Visa Purchasing>; interacPresent = (null); type = card_present>; applicationPreferredName = Stripe Credit; applicationCryptogram = 7A3AC13EF8B092F5; terminalVerificationResults = 0000000000; transactionStatusInformation = 0000>; emvAuthData = 8A023030; networks = (null); network = visa; issuer = Celtic Bank; description = Visa Purchasing>
Card Brand: Visa
Card Country: US
Card Funding: Credit
Generated Card: None
Cardholder Name: CARDHOLDER/VISA

last moth
#

Once the Payment Intent is confirmed, i.e. in requires_capture status, you can't update the amount

silver valve
#

i will check ,

but befor confirm payment how to get card details

last moth
#

Have you read the doc link I shared above? It provides the guide on how you can inspect the card details before confirming the PaymentIntent

silver valve
#

Sure, Thanks

last moth
#

No problem! Happy to help 😄

silver valve
#

hi

we have create payment intent server and retrive successfully following stripe document collect method suuceed get payment method but we have receive payment method was null :

Client Secret: pi_3QuV2oHGEu8wlVR00UGvCZ6I_secret_PgWoA1KphDjN2sJAFiX9qOWw4
Payment Intent ID action : pi_3QuV2oHGEu8wlVR00UGvCZ6I
retrievePaymentIntent succeeded: <SCPPaymentIntent: 0x303690b40; amount = 200; amount_details = <SCPAmountDetails: 0x300a26520; tip = <SCPTip: 0x300a26580; amount = (null)>>; amount_tip = (null); capture_method = manual; currency = gbp; created = 2025-02-20 8:23:42 am +0000; charges = (
); metadata = {
}; offline_details = (null); payment_method = (null); payment_method_id = (null); statement_descriptor = (null); statement_descriptor_suffix = (null); status = requires_payment_method; stripeId = pi_3QuV2oHGEu8wlVR00UGvCZ6I>
my totall amt forr tapToPay Adding tax : ==>> 2.0

collectResult -- >> <SCPPaymentIntent: 0x303690b40; amount = 200; amount_details = <SCPAmountDetails: 0x300a26520; tip = <SCPTip: 0x300a26580; amount = (null)>>; amount_tip = (null); capture_method = manual; currency = gbp; created = 2025-02-20 8:23:42 am +0000; charges = (
); metadata = {
}; offline_details = (null); payment_method = (null); payment_method_id = (null); statement_descriptor = (null); statement_descriptor_suffix = (null); status = requires_confirmation; stripeId = pi_3QuV2oHGEu8wlVR00UGvCZ6I>
collectPaymentMethod succeeded

#

our code :

else if let collectPaymentMethodPaymentIntent = collectResult {
print ("collectResult -- >>",collectResult!)
print("collectPaymentMethod succeeded")

            if let paymentMethod = collectPaymentMethodPaymentIntent.paymentMethod {
                    print("Payment Method found:", paymentMethod)
                    
                if let card = paymentMethod.cardPresent ?? paymentMethod.interacPresent  {
                        print("Card Details:", card)
                        print("Card Brand:", card.brand)
                    } else {
                        print("Card details are nil")
                    }
                } else {
                    print("Payment Method is nil")
                }
last moth
#

Have you set let collectConfig = try CollectConfigurationBuilder().setUpdatePaymentIntent(true).build()?

silver valve
#

will try this and connect you