Skip to content

Commit

Permalink
[mod] update readme callback action list
Browse files Browse the repository at this point in the history
  • Loading branch information
izzul02 committed Nov 7, 2022
1 parent 0e8e8a6 commit 20bf1c0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ The default payment method will use Ratapay balance, so if the tested account di

## Callback

Ratapay sends a POST callback on certain event, one of those is a succesful payment, which contains these data
Ratapay sends a POST callback on certain event which contains these data:

| property | type | note |
|----------|--------|--------------------------------------|
Expand All @@ -346,7 +346,7 @@ $valid = hash_equals($_POST['hash'], hash_hmac('sha256', $_POST['data'], $mercha
The data contains following information
| Property | Type | Note |
|----------------|---------|---------------------------------------------|
| action | Integer | Callback action type = 1 |
| action | Integer | Refer to Action List below* |
| invoice_id | String | Invoice ID from merchant system |
| paysystem | String | Payment channel used to pay the transaction |
| amount | Integer | Amount of payment |
Expand All @@ -355,6 +355,17 @@ The data contains following information
| merchant_id | Integer | Merchant ID |
| ref | String | Transaction reference number |

### *Action List
| Action | Event |
|--------|---------|
| 1 | Payment Success |
| 2 | - |
| 3 | - |
| 4 | Recurring Payment Failed |
| 5 | Recurring Payment Success |
| 6 | Refund Success |
| 7 | Split Fund Success |

## Testing

``` bash
Expand Down

0 comments on commit 20bf1c0

Please sign in to comment.