Payment Gateway Info

Hi,

i want develop a new payment gateway with Stripe to use Klarna payment. I have follow this guide https://docs.cs-cart.com/latest/developer_guide/addons/tutorials/payment_processor_addon.html

i have created all files and logic php to send data to stripe (stripe receive amount an other info). After click on button submit order on cs-cart, i receive a message transaction refused from client

what could be the mistake?

Hello

Maybe you send wrong parameters to the payment system and you come back right away.
Or the background communication (via webhook) is not working.
Best regards
Robert

i insert in my php file this code

require ‘vendor/autoload.php’;
// This is a public sample test API key.
// Don’t submit any personally identifiable information in requests made with this key.
// Sign in to see your own test API key embedded in code samples.
\Stripe\Stripe::setApiKey(‘sk_test_9W1R4v0cz6AtC9PVwHFzywti’);

header(‘Content-Type: application/json’);

$YOUR_DOMAIN = ‘http://localhost:4242/public’;

$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 . ‘/success.html’,
‘cancel_url’ => $YOUR_DOMAIN . ‘/cancel.html’,
]);

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

Hello

This code should be in file which handle payment processor in section

if ($mode == 'place_order' ||  $mode == 'repay') {
your code
}
 

Best regards

Robert

Hello

This code should be in file which handle payment processor in section

if ($mode == 'place_order' ||  $mode == 'repay') {
your code
}
 

Best regards

Robert

thanks, it works! how can i retrieve order total? I tried with $_REQUEST['$order_info.total'] but doesn't work

i have resolve with $order_info['total'] :mrgreen:

Hello

You are welcome :)

Best regards

Robert

Hi,

i want develop a new payment gateway with Stripe to use Klarna payment. I have follow this guide https://docs.cs-cart.com/latest/developer_guide/addons/tutorials/payment_processor_addon.html

i have created all files and logic php to send data to stripe (stripe receive amount an other info). After click on button submit order on cs-cart, i receive a message transaction refused from client

what could be the mistake?

hello,,,

am about to do the same i want to add new payment method that send data through gateway ( amount , card no , IPIN) what are the main files that can help me do so ,,, i looked it built in add-on and i found a lot of files in di

folders !! help please

Hello

Please read article

https://docs.cs-cart.com/latest/developer_guide/addons/tutorials/payment_processor_addon.html

Best regards

Robert

https://docs.cs-cart...ssor_addon.html

I followed the tutorial and i wrote the code and it send form data contain all order details to issuing bank URL but now i want to add virtual link to receive the data and send feedback ? i dont know how to do so ?? i created php file temporary to receive and send feedback to my payment gateway but i dont know how to redirect it back with response data to my payment gateway

any help please?