Skip to content

Commit c3df836

Browse files
committed
readme.md
1 parent 322077c commit c3df836

File tree

2 files changed

+243
-0
lines changed

2 files changed

+243
-0
lines changed

ENGLISH.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Anypay
2+
3+
# Anypay
4+
5+
## Introduction
6+
Anypay is a PHP library for conducting online payment transactions. This library provides the ability to connect to various payment gateways and offers a simple and uniform experience for developers through a unified API.
7+
## Features
8+
- Support for multiple payment gateways
9+
- Error and exception management
10+
- Dynamic payment settings configuration
11+
- Trackable events for each stage of the payment process
12+
## Active Gateways in This Package
13+
14+
15+
```
16+
$gateways = [
17+
'asanpardakht',
18+
'aqayepardakht',
19+
'atipay',
20+
'azkiVam', // Installment Anypay
21+
'behpardakht', // mellat
22+
'bitpay',
23+
'digipay',
24+
'etebarino', // Installment Anypay
25+
'fanavacard',
26+
'idpay',
27+
'irankish',
28+
'local',
29+
'jibit',
30+
'nextpay',
31+
'omidpay',
32+
'parsian',
33+
'pasargad',
34+
'payir',
35+
'payfa',
36+
'paypal', // will be added soon in next version
37+
'payping',
38+
'paystar',
39+
'poolam',
40+
'rayanpay',
41+
'sadad', // melli
42+
'saman',
43+
'sep', // saman electronic Anypay, Keshavarzi & Saderat
44+
'sepehr', // saderat
45+
'sepordeh',
46+
'sizpay',
47+
'toman',
48+
'vandar',
49+
'walleta', // Installment Anypay
50+
'yekpay',
51+
'zarinpal',
52+
'zibal'
53+
];
54+
55+
این درگاه‌ها به شما امکان می‌دهند تا با استفاده از تنظیمات مختلف، پرداخت‌های خود را از طریق درگاه‌های متنوع انجام دهید.
56+
57+
```
58+
## How to Use
59+
To use Anypay, you first need to add it to your PHP project. Then, you can manage your payment transactions via the API methods.
60+
61+
### Example
62+
Below is a sample code for creating a payment transaction:
63+
64+
### php
65+
66+
```php
67+
$config = ['driver' => 'gatewayName', 'api_key' => 'your_api_key'];
68+
$anypay = new Samgeeksdev\Anypay\Anypay($config);
69+
$invoice = new Samgeeksdev\Anypay\Invoice();
70+
$invoice->amount(1000); // amount in Rials
71+
$anypay->via('gatewayName')->purchase($invoice)->pay();
72+
```
73+
74+
75+
### Using the payWith function
76+
77+
```php
78+
$config = ['api_key' => 'your_api_key'];
79+
$gateway = 'gatewayName';
80+
$amount = 1000; // amount in Rials
81+
try {
82+
$anypay = new Samgeeksdev\Anypay\Anypay($config);
83+
$response = $anypay->payWith($gateway, $amount, $config);
84+
echo $response->getContent(); // Display response details
85+
} catch (Exception $e) {
86+
echo 'Error in payment: ' . $e->getMessage();
87+
88+
89+
```
90+
91+
### verify
92+
93+
```php
94+
95+
96+
php
97+
try {
98+
$anypay = new Samgeeksdev\Anypay\Anypay($config);
99+
$receipt = $anypay->verify();
100+
echo 'Payment confirmed. Transaction number: ' . $receipt->getTransactionId();
101+
} catch (Exception $e) {
102+
echo 'Error in payment confirmation: ' . $e->getMessage();
103+
}
104+
105+
```
106+
### If you want to call information via the config file
107+
108+
```php
109+
110+
$invoice = (new Invoice)->amount(1000);
111+
112+
Anypay::via('driverName')->purchase(
113+
$invoice,
114+
function($driver, $transactionId) {
115+
}
116+
);
117+
118+
```
119+
120+
## Support
121+
For further support and troubleshooting, you can visit the Issues section on GitHub or contact the support team.
122+
123+
## License
124+
This project is published under the MIT license. You can view the full version of the license in the LICENSE file available in the code repository.

KURDISH.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Anypay
2+
3+
## پێناسه‌
4+
Anypay کتێبخانەیەکی PHPیە بۆ ئەنجامدانی مامەڵەکانی پارەدانی ئۆنلاین. ئەم کتێبخانەیە توانای پەیوەستکردنی بە درگای جیاوازی پارەدانی فەراهەم دەکات و لە رێگەی APIیەکی یەکگرتوو، تەجربەیەکی سادە و یەکسان بۆ پەرەپێدەران دابین دەکات.
5+
## تایبەتمەندیەکان
6+
- پشتیوانی لە چەندین درگای پارەدان
7+
- بەڕێوەبردنی هەڵەکان و نایاساییەکان
8+
- توانای ڕێکخستنی دیاریکراوی پارەدان بە شێوەی داینامیک
9+
- ڕووداوەکان دەتوانرێن بۆ هەر قۆناغێکی پارەدان بەدوادا بچرێن
10+
## درگاه‌های چالاک لەم بستەدا
11+
```
12+
$gateways = [
13+
'asanpardakht',
14+
'aqayepardakht',
15+
'atipay',
16+
'azkiVam', // Installment Anypay
17+
'behpardakht', // mellat
18+
'bitpay',
19+
'digipay',
20+
'etebarino', // Installment Anypay
21+
'fanavacard',
22+
'idpay',
23+
'irankish',
24+
'local',
25+
'jibit',
26+
'nextpay',
27+
'omidpay',
28+
'parsian',
29+
'pasargad',
30+
'payir',
31+
'payfa',
32+
'paypal', // will be added soon in next version
33+
'payping',
34+
'paystar',
35+
'poolam',
36+
'rayanpay',
37+
'sadad', // melli
38+
'saman',
39+
'sep', // saman electronic Anypay, Keshavarzi & Saderat
40+
'sepehr', // saderat
41+
'sepordeh',
42+
'sizpay',
43+
'toman',
44+
'vandar',
45+
'walleta', // Installment Anypay
46+
'yekpay',
47+
'zarinpal',
48+
'zibal'
49+
];
50+
51+
ئەم درگاه‌ها بە تۆ دەتوانن بە بەکارهێنانی ڕێکخستنە جیاوازەکان، پارەدانەکانت بەرێوە ببەن.
52+
53+
54+
```
55+
## چۆنیەتی بەکارهێنان
56+
بۆ بەکارهێنانی Anypay، پێویستە سەرەتا ئەمە بە پڕۆژەی PHP خۆت زیاد بکەیت. پاشان دەتوانی لە رێگەی مەتۆدەکانی API، مامەڵەکانی پارەدانەکەت بەڕێوە ببەیت.
57+
58+
### نموونە
59+
لە خوارەوە نموونەیەکی کۆد بۆ دروستکردنی مامەڵەیەکی پارەدان هاتووە:
60+
61+
### php
62+
```php
63+
$config = ['driver' => 'gatewayName', 'api_key' => 'your_api_key'];
64+
$anypay = new Samgeeksdev\Anypay\Anypay($config);
65+
$invoice = new Samgeeksdev\Anypay\Invoice();
66+
$invoice->amount(1000); // بڕی پارە بە ریال
67+
$anypay->via('gatewayName')->purchase($invoice)->pay();
68+
```
69+
70+
71+
### بەکارهێنانی فەنکشنی paywith
72+
```php
73+
$config = ['api_key' => 'your_api_key'];
74+
$gateway = 'gatewayName';
75+
$amount = 1000; // بڕی پارە بە ریال
76+
77+
try {
78+
$anypay = new Samgeeksdev\Anypay\Anypay($config);
79+
$response = $anypay->payWith($gateway, $amount, $config);
80+
echo $response->getContent(); // پیشاندانی وردەکارییەکانی وەڵام
81+
} catch (Exception $e) {
82+
echo 'هەڵە لە پارەدان: ' . $e->getMessage();
83+
}
84+
```
85+
86+
### پشتڕاستکردنەوە
87+
88+
```php
89+
90+
try {
91+
$anypay = new Samgeeksdev\Anypay\Anypay($config);
92+
$receipt = $anypay->verify();
93+
echo 'پارەدان پشتڕاست کرایەوە. ژمارەی مامەڵە: ' . $receipt->getTransactionId();
94+
} catch (Exception $e) {
95+
echo 'هەڵە لە پشتڕاستکردنەوەی پارەدان: ' . $e->getMessage();
96+
}
97+
echo 'پارەدان پشتڕاست کرایەوە. ژمارەی مامەڵە
98+
99+
```
100+
### ئەگەر دەتەوێت زانیاریەکان لە رێگەی فایلی کۆنفیگەوە بانگهێشت بکرێن
101+
102+
```php
103+
104+
$invoice = (new Invoice)->amount(1000);
105+
106+
Anypay::via('driverName')->purchase(
107+
$invoice,
108+
function($driver, $transactionId) {
109+
}
110+
);
111+
112+
```
113+
114+
## پشتیوانی
115+
بۆ وەرگرتنی پشتیوانی زیاتر و چارەسەرکردنی کێشەکانی دەرکەوتوو، دەتوانیت سەردانی بەشی Issues لە GitHub بکەیت یان پەیوەندی بە تیمی پشتیوانی بکەیت.
116+
117+
118+
## مجوز
119+
ئەم پڕۆژەیە بە مۆڵەتی MIT بڵاوکراوەتەوە. دەتوانیت وەشانی تەواوی مۆڵەتەکە لە فایلی LICENSE دا ببینیت کە لە خەزنی کۆددا هەیە.

0 commit comments

Comments
 (0)