#n_api

1 messages ¡ Page 1 of 1 (latest)

fleet pagodaBOT
#

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

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

crystal sluice
#

hi there!

gusty mirage
#

Hello

crystal sluice
#

as mentioned in the error message, we don't recommend directly passing the raw card numbers

#

what are you trying to do exactly?

gusty mirage
#

I understand the what shpuld I do, is there any encoding before passing or something?

crystal sluice
#

I don't understand your question. you shouldn't pass the raw numbers to Stripe.

#

instead it's the customer you should entier themselves the numbers

gusty mirage
crystal sluice
gusty mirage
#

My questione is : I am making payment where in the process check customer exist or if not then create a new one,
Later check if card exist then fetch it and use else create a card and attach the card to the custome.

So now in this process I am failing

#

Using the stripe apis I want to create card there and later attach it to customer and then make payment using the api

crystal sluice
#

is your business PCI compliant?

gusty mirage
#

I have the test account and using the test-card to implement the code and make it work with test data

#

Once code is up I will change it to live account

crystal sluice
#

is your goal to save a payment method while also charging it, or to only save the payment method for later?

gusty mirage
crystal sluice
#

you can't, unless you are PCI comliant.

gusty mirage
#

Nope I want to make payment right away, but stripe I have to store card and then make payment-intent on it right

crystal sluice
gusty mirage
#

What if the given card is not exist and I want to make payment for customer. In stripe I have to store and then use it right ?

crystal sluice
#

correct

gusty mirage
#

PCI comliant, so without it, and using the stripe package will I be able to do the following ?
$paymentMethod = PaymentMethod::create([
'type' => 'card',
'card' => $cardDetails,
'customer' => $customerId,
]);

            $customer->invoice_settings->default_payment_method = $paymentMethod->id;
            $customer->save();

This is create card using the stripe' sdk

crystal sluice
#

no you can't directly manipulate raw card numbers.

#

for me to help, can you answer this question:

  • are you trying to test things quickly in test mode
  • or is your end goal is to design a real payment flow in test mode
gusty mirage
#

I have test account, how can I verify this 'PCI comliant' in my account?

#

This => end goal is to design a real payment flow in test mode

#

and in test mode all works fine then make it LIVE, so can make live transaction

crystal sluice
#

This => end goal is to design a real payment flow in test mode
got it. now can you answer this question: how are you accepting payments? Checkout Session, Payment Element, something else?

gusty mirage
#

I have card-data pass to my service class now here using the card-data I have to charge (using stripe api)

crystal sluice
gusty mirage
#

I have payment element

crystal sluice