PHPackages                             maras0830/laravel-paynow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. maras0830/laravel-paynow

ActiveLibrary[Payment Processing](/categories/payments)

maras0830/laravel-paynow
========================

Laravel 5 for paynow.

v2.1.13(5mo ago)310.7k6PHP

Since Aug 2Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Maras0830/laravel-paynow)[ Packagist](https://packagist.org/packages/maras0830/laravel-paynow)[ RSS](/packages/maras0830-laravel-paynow/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (36)Used By (0)

Paynow SDK
==========

[](#paynow-sdk)

ToDo
----

[](#todo)

- CreditCard Backend Single Transaction
- Transaction Check
- Subscription
- Installment
- 3-Domain Secure
- Callback Check

Installation
------------

[](#installation)

Enable php extension soap

composer require

```
$ composer require maras0830/laravel-paynow"
```

add to `config/app.php`

```
'providers' => [
   // ....
   Maras0830\PayNowSDK\Providers\PayNowServiceProvider::class
],
```

publish config file to *config/paynow.php*

```
$ php artisan vendor:publish --provider=Maras0830\PayNowSDK\Providers\PayNowServiceProvider

```

in `.env`

```
PAYNOW_DEBUG_MODE=true
PAYNOW_WEB_NO=
PAYNOW_PASSWORD=
PAYNOW_EC_NAME=
PAYNOW_ENCRYPT_KEY=
PAYNOW_IV=
PAYNOW_CARDINAL=
```

### Usage

[](#usage)

測試卡號： 4025950011112222 有效年月： 12/12 安全碼：999

1. CreditCard backend transaction

```
$now = \Carbon\Carbon::now('Asia/Taipei');
$transaction = new Maras0830\PayNowSDK\CreditCardTransaction($now);

$card_number = '4023730207292803';
$valid_year = '20';
$valid_month = '05';
$safe_code = '685';

// $res is transaction response.
$res = $transaction
    ->setEncrypt()
    ->setOrder('測試交易', 'OWLTEST1000111002', 100) // orderinfo strlen > 3
    ->setCreditCard($card_number, $valid_year, $valid_month, $safe_code)
    ->setCustomer(1, 'Eric', '09121212121212', 'test@test.com', '127.0.0.1')
    ->checkout()
    ->decodeAndValidate();
```

2. Transaction Check

```
$my_order_number = 'TEST10001';

$sdk = new Maras0830\PayNowSDK\PayNowAPI();

/**
 * @throws Maras0830\PayNowSDK\Exceptions\OrderNotFoundException
 * @throws Maras0830\PayNowSDK\Exceptions\TransactionException
 * @throws Maras0830\PayNowSDK\Exceptions\OrderIsCancelException
 * @throws Maras0830\PayNowSDK\Exceptions\UnKnownException
 */
$res = $sdk->transactionCheck($my_order_number);

/**
$res => [
    'order_number' => 'xxxxx' // Paynow Order number
    'last4' => 'xxxx'         // CreditCard last4 code
];
**/
```

3. Subscription

> First Transaction

```
$now = Carbon\Carbon::now('Asia/Taipei');
$transaction = new Maras0830\PayNowSDK\CreditCardTransaction($now);

$card_number = '4023730207292803';
$valid_year = '22';
$valid_month = '05';
$safe_code = '685';

$account = 'account';
$password = 'password';

/**
 * @throws Maras0830\PayNowSDK\Exceptions\PayNowException
 * @throws Maras0830\PayNowSDK\Exceptions\ValidateException
 * @throws Maras0830\PayNowSDK\Exceptions\TransactionException
 */
$res = $transaction
    ->setEncrypt()
    ->setOrder('測試交易', 'TEST123' . time(), 100) // orderinfo strlen > 3
    ->setCreditCard($card_number, $valid_year, $valid_month, $safe_code)
    ->setCustomer(1, 'Eric', '09121212121212', 'test@test.com', '127.0.0.1', $account, $password)
    ->checkoutAndSaveCard()
    ->decodeAndValidate();

/**
$res = [
    "WebNo" => "70828783"
    "TotalPrice" => 100
    "OrderNo" => "TEST1231593574222"
    "ECPlatform" => null
    "BuySafeNo" => "8000002007014585819"
    "TranStatus" => "S"
    "PassCode" => "FDEA87E80373A00FAD48C89AD5BA32A954675678"
    "RespCode" => "00"
    "ResponseMSG" => ""
    "ApproveCode" => "A00001"
    "last4CardNo" => "2803"
    "CheckNo" => null
    "InvoiceNo" => null
    "batchNo" => null
    "InvoiceStatus" => null
    "Result3D" => ""
    "CIFID_SN" => "1"  // 該卡 token, 請保存
    "ReturnURL" => null
    "ErrorMessage" => ""
]
*/
```

> Others Transaction

```
$now = Carbon\Carbon::now('Asia/Taipei');
$transaction = new Maras0830\PayNowSDK\CreditCardTransaction($now);

$account = 'account';
$password = 'password';
$card_sn = '123'; // CIFID_SN

$res = $transaction
    ->setEncrypt()
    ->setOrder('測試交易', 'TEST123' . time(), 100) // orderinfo strlen > 3
    ->setCustomer(1, 'Eric', '09121212121212', 'test@test.com', '127.0.0.1', $account, $password)
    ->checkoutBySN($card_sn) // safe_code can use 'XXX'
    ->decodeAndValidate();

/**
$res = [
    "WebNo" => "70828783"
    "TotalPrice" => 100
    "OrderNo" => "TEST1231593574222"
    "ECPlatform" => null
    "BuySafeNo" => "8000002007014585819"
    "TranStatus" => "S"
    "PassCode" => "FDEA87E80373A00FAD48C89AD5BA32A954675678"
    "RespCode" => "00"
    "ResponseMSG" => ""
    "ApproveCode" => "A00001"
    "last4CardNo" => "2803"
    "CheckNo" => null
    "InvoiceNo" => null
    "batchNo" => null
    "InvoiceStatus" => null
    "Result3D" => ""
    "CIFID_SN" => "1"  // 該卡 token, 請保存
    "ReturnURL" => null
    "ErrorMessage" => ""
]
*/
```

> Refund Order

```
$payment_refund = new Maras0830\PayNowSDK\PaymentRefund();

$res = $payment_refund->refund(
    '8000001910145799460',
    '860.0000',
    '退款測試',
    1,
    '',
    '',
    '',
    'harley@gs8899.com.tw',
    'Harley',
    'harley@gs8899.com.tw'
);
```

交易錯誤碼
-----

[](#交易錯誤碼)

PayNow CodeException CodeError Msg00unknown error0101發卡銀行要求回覆(call bank)0202發卡銀行要求回覆(call bank)0404拒絕交易,請聯絡發卡銀行0505發卡銀行拒絕交易0606發卡銀行拒絕交易0707發卡銀行拒絕交易1212拒絕交易,卡號錯誤1414拒絕交易,卡號錯誤1515無此發卡銀行3333拒絕交易,過期卡4141拒絕交易,請聯絡發卡銀行4343拒絕交易,請聯絡發卡銀行5151信用卡額度不足5454拒絕交易，過期卡5555拒絕交易，密碼錯誤5656發卡銀行拒絕交易5757發卡銀行拒絕交易5858發卡銀行拒絕交易6262發卡銀行拒絕交易8787拒絕交易,請聯絡發卡銀行9090銀行系統結算中9696收單行系統功能異常916916主機斷線920920拒絕交易,卡號錯誤922922密碼錯誤933933訂單編號不存在934934發卡行3D頁面驗證錯誤935935發卡行3D頁面驗證錯誤939939MID 停用N71007拒絕交易,請聯絡發卡銀行P11011拒絕交易 超過日限額度Q11021發卡銀行拒絕交易取消狀態
----

[](#取消狀態)

Codestatus0買家申請退貨1買賣家確認2銀行退款3賣家申請退款

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance69

Regular maintenance activity

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 52.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~78 days

Recently: every ~171 days

Total

35

Last Release

178d ago

Major Versions

v0.1.6 → v1.0.12019-11-28

v1.3.1 → v2.1.12021-01-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ea1aaf015e5b965c29ba390d0883f84d740b2b8ad8ef5ee530b6c22a91ba440?d=identicon)[Maras0830](/maintainers/Maras0830)

---

Top Contributors

[![Maras0830](https://avatars.githubusercontent.com/u/7960232?v=4)](https://github.com/Maras0830 "Maras0830 (39 commits)")[![ericliao79](https://avatars.githubusercontent.com/u/13558443?v=4)](https://github.com/ericliao79 "ericliao79 (25 commits)")[![nick322](https://avatars.githubusercontent.com/u/9151347?v=4)](https://github.com/nick322 "nick322 (5 commits)")[![YishOwlting](https://avatars.githubusercontent.com/u/64765017?v=4)](https://github.com/YishOwlting "YishOwlting (4 commits)")[![owltommy](https://avatars.githubusercontent.com/u/63337268?v=4)](https://github.com/owltommy "owltommy (1 commits)")

### Embed Badge

![Health badge](/badges/maras0830-laravel-paynow/health.svg)

```
[![Health](https://phpackages.com/badges/maras0830-laravel-paynow/health.svg)](https://phpackages.com/packages/maras0830-laravel-paynow)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
