0

Paytrail payments in React

Hey, I'm working on a web project in React that involves payment specifically with Paytrail. The libraries that support this way are outdated, so I'm just trying to wrap my head around accomplishing that payment by sending the form to an API endpoint for Paytrail. Still I can't really understand some fields (like Merchant). Can anyone please help me understand this payment method better, and what's the best way of handling it? I've never dealt with it before. Thank you

31st May 2023, 1:40 PM
Markus
Markus - avatar
5 ответов
+ 1
Paytrail is a payment gateway service that enables businesses to accept payments online through various payment methods. To use Paytrail payment gateway in your React project, you need to: 1. Create a Paytrail account and obtain API credentials (merchant ID, secret key, payment URL, and notification URL) from their website. 2. Build the payment form, including the necessary fields such as customer name, email, phone number, order reference number, amount, currency, and payment method. 3. Send the data from the payment form to Paytrail API endpoint using HTTP POST method with SSL encryption. 4. Handle the response from Paytrail API and update the UI accordingly The "merchant" field refers to your merchant ID on Paytrail, which uniquely identifies your business account in their system. This is required for every transaction you make through Paytrail.
31st May 2023, 2:50 PM
Firdous
Firdous - avatar
+ 1
As for the outdated libraries, you can try using the Paytrail REST API to integrate payment gateway in your React project. This will allow you to make API calls to Paytrail and handle the responses more efficiently. Alternatively, you could use a third-party payment library that supports Paytrail, such as Stripe or PayPal, which would simplify the integration process and keep your codebase up-to-date
31st May 2023, 2:51 PM
Firdous
Firdous - avatar
+ 1
Firdous Hey, thanks a lot for your reply, that was very helpful Can you please tell me about the meaning of order reference number? Tbh it's the first time I'm dealing with payments so I'm a little confused about some of those field like this one too. And if I have a list of orders, can I send them all together, I've detailed the name of the order and its price, plus some other details that relate to the order How should I format that? And is there some resources I could make use of (especially ones that handle paytrail in stripe) so I don't take much of your time? I'm really sorry for bothering you with all those questions. Thanks so much
31st May 2023, 5:32 PM
Markus
Markus - avatar
0
Hello! An order reference number is a unique identifier assigned to a specific transaction or purchase. It helps in tracking and identifying specific orders in a system. If you have a list of orders with all the necessary details such as name, price, and other relevant information, you can send them all together. However, you need to ensure that each order has a unique reference number to avoid confusion and mix up. Regarding formatting, you can use a spreadsheet or a table to store and organize your orders. Alternatively, you can use a software or application that is specifically designed for managing orders. For resources that handle Paytrail in Stripe, you can visit the Stripe documentation or contact their support team for guidance on how to integrate Paytrail with your Stripe account. I hope this will help you too~~
31st May 2023, 5:50 PM
Firdous
Firdous - avatar
0
Thank you so much I'll let you know if there's something that came up, I'm just handling the frontend though Not sure if this should be on me, but I guess I'll just have to cut the submission to the server, or make two, or just leave that to the backend So my orders are managed as a state in redux, I'll make sure to follow those guidelines and see if things work out correctly Thanks once more Btw, is there a way for me to test things out in like a paytrail API for developers?
1st Jun 2023, 1:56 PM
Markus
Markus - avatar