#mak_code

1 messages ยท Page 1 of 1 (latest)

severe mirageBOT
#

๐Ÿ‘‹ 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/1301955653593464914

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

wary gyro
#

Hi ๐Ÿ‘‹

Can you clarify what exactly you are trying to do here? How were you trying to use the Payment Link URL?

midnight aspen
#

hi

#

I need help with the Integration process with stripe Payment Gateway on my reseller club account

wary gyro
#

What exactly have you tried?

midnight aspen
#

Reseller has a default php integration kit which requires us to upload the files in the kit on our server. I have tried using a stripe sample code which has the checkout.php file and other files

wary gyro
#

Okay, what Stripe product do you want to use?

#

Payment Link, Checkout Session, Payment Element?

midnight aspen
#

what i need now is the code to add to script i share in order to take payments when an order is made on my site

#

Checkout Session i think

wary gyro
#

It sounds like you are not too familiar with Stripe integrations. In that case I think you should build a simple stand-alone Checkout integration like we document here: https://docs.stripe.com/checkout/quickstart

Don't try to plug it in to anything until after you have this fully working and you can test it

#

Then you can try including it in your existing PHP and see where you get errors. We can help once you have specific errors you are asking about.

severe mirageBOT
midnight aspen
#

okay

#

let me try this

midnight aspen
#

this is the error message

wraith mountain
#

Hello! I'm taking over and catching up...

#

That's not a Stripe error message. Do you know where that error is coming from?

midnight aspen
#

from my server

#

trying to integrate the paymnent gateway on my server and connect to my site

#

thats the code

wraith mountain
#

I can't say, this isn't Stripe code and the checksum in question seems to have nothing to do with Stripe. We can only help with Stripe code/SDKs/APIs/etc. here.

midnight aspen
#

you seem not to understand me

#

there is a stripe code within the code i sent

#

require_once '../vendor/autoload.php';
require_once '../secrets.php';
$stripe_secret_key="sk_test_51Mpt61LL5sJox7yoBMi2B09K5Rwd8wYcYbb2aNTr29vXBPesxBhaLQiLZTFzvX4BBwZvxZtooy9mL3cT0QIx5GFg00TKuReV6i";

\Stripe\Stripe::setApiKey($stripeSecretKey);
header('Content-Type: application/json');

$YOUR_DOMAIN = 'http://payment.pws.software';

$checkout_session = \Stripe\Checkout\Session::create([
'line_items' => [[
# Provide the exact Price ID (e.g. pr_1234) of the product you want to sell
'price' => '{{PRICE_ID}}',
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => $YOUR_DOMAIN . 'http://payment.pws.software/stripe/success.html',
'cancel_url' => $YOUR_DOMAIN . 'http://payment.pws.software/stripe/cancel.html',
]);

header("HTTP/1.1 303 See Other");
header("Location: " . $checkout_session->url);

wraith mountain
#

Right, but the error you're getting isn't related to that code.

#

It's coming from other code which doesn't seem related to Stripe.

midnight aspen
#

so what do you recommend i do

#

how do i add the stripe payment gateway on my site to take payments for order?

wraith mountain
#

You would need to debug the checksum error you're getting. Is the checksum error coming from code you wrote or code that someone else wrote?

midnight aspen
#

okay

#

can you assist me to do the integration on my site ?

wraith mountain
#

I can assist you with the Stripe side of things, but I can't help with third-party code. You would need to talk to the third-party for help in that case.

midnight aspen
#

sure will appreciate

#

lets get on with inegrating stripe on my side

#

site*

wraith mountain
#

What questions do you have?

midnight aspen
#

can i get a step by step guide ?

wraith mountain
#

Is that not what you want?

midnight aspen
#

<?php

require_once '../vendor/autoload.php';
require_once '../secrets.php';

\Stripe\Stripe::setApiKey($stripeSecretKey);
header('Content-Type: application/json');

$YOUR_DOMAIN = 'https://payment.pws.software/stripe';

$checkout_session = \Stripe\Checkout\Session::create([
'line_items' => [[
# Provide the exact Price ID (e.g. pr_1234) of the product you want to sell
'price' => '{{PRICE_ID}}',
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => $YOUR_DOMAIN . 'https://payment.pws.software/strip/success.html',
'cancel_url' => $YOUR_DOMAIN . 'https://payment.pws.software/strip/cancel.html',
]);

header("HTTP/1.1 303 See Other");
header("Location: " . $checkout_session->url);

wraith mountain
#

Check your server's error logs for the cause of the 500.

#

Also, {{PRICE_ID}} is a placeholder that's meant to be replaced with a Price ID.

midnight aspen
#

what do i place at the price ID since its not a single product

wraith mountain
#

Since this is just a test to help you get familiar with how this works I recommend you create a single test Product with a single test Price in the Dashboard and use that.