PayWay Rust SDK
Unofficial Rust SDK for ABA PayWay Payment Gateway (Cambodia).
Features
- QR Code Generation
- Ecommerce Checkout
- Credentials on File (COF)
- Payouts
- Pre-authorization
- Sandbox + Production environments
Installation
[]
= "0.1.0"
Quick Start
use ;
let client = new;
let params = builder
.transaction_id
.amount
.currency
.return_url
.build_with_client?;
Configuration
Sandbox (Default)
let client = new;
Production
let config = production;
let client = with_config;
Custom Base URL (testing with WireMock)
let config = sandbox
.with_base_url;
let client = with_config;
API Overview
Checkout
let params = builder
.transaction_id
.amount
.currency
.first_name
.last_name
.email
.return_url
.build_with_client?;
QR Code
let request = builder
.transaction_id
.amount
.currency
.payment_option
.qr_template
.build_with_client?;
let response = client.generate_qr.await?;
Examples
See examples/ directory:
generate_qr.rs- Generate QR codescheckout.rs- Ecommerce checkout
Testing
License
GNU General Public License v3.0 - See LICENSE
Contributing
Contributions welcome! Please open an issue or PR on GitHub