Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/windwalker-io/pay2go
PHP Pay2Go Bridge
https://github.com/windwalker-io/pay2go
pay2go pay2go-php
Last synced: 2 months ago
JSON representation
PHP Pay2Go Bridge
- Host: GitHub
- URL: https://github.com/windwalker-io/pay2go
- Owner: windwalker-io
- Created: 2015-02-28T05:00:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-03T05:54:46.000Z (about 9 years ago)
- Last Synced: 2024-10-11T07:52:38.853Z (3 months ago)
- Topics: pay2go, pay2go-php
- Language: PHP
- Size: 32.2 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Pay2GO PHP Package
開發中,還要一陣子才完成...
## 使用範例
``` php
$pay2go = new \Windwalker\Pay2Go\Pay2Go('MerchantID', 'key', 'iv');// Basic options
$pay2go->setTest(true) // Use Test Platform
->setMerchantOrderNo($orderNo)
->setVersion('1.1')
->setAmt((int) $price)
->setRespondType(Pay2Go::RESPONSE_TYPE_STRING) // Use String response
->setItemDesc($desc)
->setEmail($email)
->setLoginType(0)
->setNotifyURL($notifyUrl)
->setReturnURL($returnUrl)
->setCustomerURL($customUrl);$pay2go->atm->enable(); // 啟用 ATM
$pay2go->barcode->enable(); // 啟用條碼
$pay2go->cvs->enable(); // 啟用超商代碼
$pay2go->webATM->enable(); // 啟用 Web ATM// 啟用信用卡
$pay2go->creditCard->enable()
->setUNIONPAY(1)
->installment('3, 6, 12');// 啟用支付寶
$pay2go->alipay->enable()
->setReceiver('Sakura')
->setTel1('123-12312-123')
->setTel2('123-123-123')
->setCount(1)
->addProduct(
$item->id,
$item->title,
$desc,
$item->price,
1
);// 啟用財富通
$pay2go->tenpay->enable()
->setReceiver('Flower')
->setTel1('123-12312-123')
->setTel2('123-123-123')
->setCount(1)
->addProduct(
$item->id,
$item->title,
$desc,
(int) $price,
1
);// 輸出成 直接 POST 即可繳費
echo $pay2go->redner(); // Render HTML Form
```