⭐️ Leave me a start please ⭐️
it will motivate me to continue maintaining and adding futures
About | Technologies | Requirements | Starting | Usage | License & Screen | Author
Simple tinkoff integration (the seller receives a link to the payment form and redirect the buyer to it); NB: with callback method
The following tools were used in this project:
Before starting :checkered_flag:, you need to have Git and Rust installed.
```bash
$ git clone https://github.com/KM8Oz/tinkoffpay-rs
$ cd tinkoffpay-rs
$ cargo install --path=.
$ cargo test requestdemourl -- --nocapture
```
```rust use crate::{Payments, Receipt, Taxation, TaxNDK}; // should be an async fn let paymenturl = Payments::default() .build( "TinkoffBankTest", "https://bulkus.ru/payback", // Success or Fail URL (GET) = [your callback url]?orderid=[orderid] // payment catch url (POST) has those params: // Json(Object { // "Amount": Number(10000), // "CardId": Number(130550983), // "ErrorCode": String("0"), // "ExpDate": String("1122"), // "OrderId": String("278600"), // "Pan": String("430000**0777"), // "PaymentId": Number(1866123460), // "Status": String("CONFIRMED"), // "Success": Bool(true), // "TerminalKey": String("1639044907391DEMO"), // "Token": String("711cd4fa0df2afa8a69a56884e9d902eb882c9a01af56498fc6bfdefaf9eef8d") // }) "210950", "Подарочная карта на 1400.00 рублей") .setamount(500) // in ruble .setcustomer("+71234567890", "a@test.com") .setreceipt( Receipt::default() .build( "a@test.com", "+71234567890", "a@test.com", Taxation::OSN ) .additem( "Наименование товара 1", // name 1, // quantity 100, // in ruble TaxNDK::None ) .additem( "Наименование товара 2", // name 2, // quantity 200, // in ruble TaxNDK::None ) ) .tourl().await; match paymenturl.clone() { Ok(m) => { println!("payment url: {:?}", m); }, Err(err) => { println!("payment error: {:?}", err); } }
```
This project is under license from MIT. For more details, see the LICENSE file.
Made with :heart: by @KM8Oz