TinkoffPay-rs

Github top language Github language count Repository size License

About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Author


:dart: About

Simple tinkoff integration (the seller receives a link to the payment form and redirect the buyer to it); NB: with callback method

:rocket: Technologies

The following tools were used in this project:

:whitecheckmark: Requirements

Before starting :checkered_flag:, you need to have Git and Rust installed.

:checkered_flag: Starting

```bash

Clone this project

$ git clone https://github.com/KM8Oz/tinkoffpay-rs

Access

$ cd tinkoffpay-rs

Install dependencies

$ cargo install --path=.

Run the project

$ cargo test requestdemourl -- --nocapture

The server will initialize in the http://localhost:3000

```

:checkered_flag: Usage

rust // should be an async fn let payment_url = Payments::default() .build( "TinkoffBankTest", "https://bulkus.ru/pay_back", "210950", "Подарочная карта на 1400.00 рублей") .set_amount(500) // in ruble .set_customer("+71234567890", "a@test.com") .set_receipt( Receipt::default() .build( "a@test.com", "+71234567890", "a@test.com", Taxation::OSN ) .add_item( "Наименование товара 1", 1, 100, // in ruble TaxNDK::None ) .add_item( "Наименование товара 2", 2, 200, // in ruble TaxNDK::None ) ) .to_url().await; match payment_url.clone() { Ok(m) => { println!("payment url: {:?}", m); }, Err(err) => { println!("payment error: {:?}", err); } }

:memo: License

This project is under license from MIT. For more details, see the LICENSE file.

Made with :heart: by @KM8Oz  

TinkoffPay-rs  

  Back to top