Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Acceptance Product] Add Info Nullable in Response Parameter and Callback Parameter #285

Merged
merged 10 commits into from
May 3, 2024
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
`docker-compose logs -f`
4. Open the application in your web browser by visiting `http://localhost:4567/`

> [!NOTE]
rahmadiantio marked this conversation as resolved.
Show resolved Hide resolved
> If Build Docker Image Failed, you can try like this
> 1. In file `Dockerfile` change ruby from `2.6-slim` to `3.0-slim` And command this line `COPY Gemfile.lock .`
> 2. In file `Gemfile` change this line `ruby '~> 2.5'` to `ruby '~> 3.0'`
> 3. **Don't forget** to change back again when you will push the code

> [!NOTE]
> If Error when you try to run local, you can try like this
> 1. In file `layout.erb` delete style tag with body content in line 34 to line 36 who has contain ```Rouge::Themes::OyTheme.render```
> 3. **Don't forget** to change back again when you will push the code

**Features**
------------

Expand Down
58 changes: 29 additions & 29 deletions source/includes/_api_account_linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ print(data.decode("utf-8"))

### Response Parameters

|Parameter |Type |Description |
|--- |--- |--- |
|success |Boolean |Will be `true` if the account linking process is successful and vice versa |
|error |Object |Error detail of the account linking process in Object `{code: <error_code>, message: <error_message>}`. This value is not null if the value of field `success` is `false` |
|data |Object |Account linking data, the detail will be explained in the next section |
|reason |String(255) |Will be filled with error reason if the linking status is failed |
|status_code |Integer |Will be `200` if the account linking process is success and will be the same as error code if the linking process is failed |
|Parameter |Type | Nullable |Description |
|--- |--- | ----- |--- |
|success |Boolean | FALSE |Will be `true` if the account linking process is successful and vice versa |
|error |Object | TRUE |Error detail of the account linking process in Object `{code: <error_code>, message: <error_message>}`. This value is not null if the value of field `success` is `false` |
|data |Object | TRUE |Account linking data, the detail will be explained in the next section. This value is not null if the value of field success is false |
|reason |String(255) | TRUE |Will be filled with error reason if the linking status is failed |
|status_code |Integer | FALSE |Will be `200` if the account linking process is success and will be the same as error code if the linking process is failed |

### Account Linking Response Data

Expand Down Expand Up @@ -463,13 +463,13 @@ print(data.decode("utf-8"))

### Response Parameters

|Parameter |Type |Description |
|--- |--- |--- |
|success |Boolean |Will be `true` if the account linking process is successful and vice versa |
|error |Object |Error detail of the account linking process in Object `{code: <error_code>, message: <error_message>}`. This value is not null if the value of field `success` is `false` |
|data |Object |Account linking data, the detail will be explained in the next section |
|reason |String(255) |Will be filled with error reason if the linking status is failed |
|status_code |Integer |Will be `200` if the account linking process is success and will be the same as error code if the linking process is failed |
|Parameter |Type | Nullable |Description |
|--- |--- | ----- |--- |
|success |Boolean | FALSE |Will be `true` if the account linking process is successful and vice versa |
|error |Object | TRUE |Error detail of the account linking process in Object `{code: <error_code>, message: <error_message>}`. This value is not null if the value of field `success` is `false` |
|data |Object | TRUE |Account linking data, the detail will be explained in the next section. This value is not null if the value of field success is false |
|reason |String(255) | TRUE |Will be filled with error reason if the linking status is failed |
|status_code |Integer | FALSE |Will be `200` if the account linking process is success and will be the same as error code if the linking process is failed |

### Account Linking Response Data

Expand Down Expand Up @@ -508,15 +508,15 @@ EWALLET | shopeepay_ewallet | Send Callback | -

### Callback Parameters

Parameter | Type | Description
--------- | ---- | -----------
username | String | Partner username
partner_user_id | String | ID generated by Partner for a specific user/customer
payment_method | String | The payment method type that user want to linked to (Currently only support `EWALLET`. In the future we will have another payment method type, such as `CARDS`)
channel_code | String | The payment channel type that user want to linked to (Currently support `dana_ewallet` and `shopeepay_ewallet`)
phone_number |String | The user phone number (format 08xxxxxxxxxx)
status | String | User's account linking status
expiration_time | String | User's account linking expiration time (example: `01/02/2020T15:00:00.000+0000`)
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -----------
username | String | FALSE | Partner username
partner_user_id | String | FALSE | ID generated by Partner for a specific user/customer
payment_method | String | FALSE | The payment method type that user want to linked to (Currently only support `EWALLET`. In the future we will have another payment method type, such as `CARDS`)
channel_code | String | FALSE | The payment channel type that user want to linked to (Currently support `dana_ewallet` and `shopeepay_ewallet`)
phone_number |String | FALSE | The user phone number (format 08xxxxxxxxxx)
status | String | FALSE | User's account linking status
expiration_time | String | FALSE | User's account linking expiration time (example: `01/02/2020T15:00:00.000+0000`)

- Other than that, at the end of account linking process, we will redirect the user to your redirect page with `partner_user_id` and result status embedded in your redirect URL. You could set your redirect url on your [dashboard](https://desktop-business.oyindonesia.com/settings/developer-options) on tab `Redirect URL`. Below are the example of redirect url result.

Expand Down Expand Up @@ -734,12 +734,12 @@ print(data.decode("utf-8"))

### Response Parameters

|Parameter |Type |Description |
|--- |--- |--- |
|status |Object |Status of response in Object `{code: <status_code>, message: <status_message>}`. |
|partner_user_id |String(255) |ID generated by Partner for a specific user/customer |
|channel_code |String(255) |The payment channel type (Currently support `dana_ewallet` and `shopeepay_ewallet`) |
|amount |BigDecimal |User e-wallet balance amount |
|Parameter |Type | Nullable |Description |
|--- |--- | ----- |--- |
|status |Object | FALSE |Status of response in Object `{code: <status_code>, message: <status_message>}`. |
|partner_user_id |String(255) | FALSE |ID generated by Partner for a specific user/customer |
|channel_code |String(255) | FALSE |The payment channel type (Currently support `dana_ewallet` and `shopeepay_ewallet`) |
|amount |BigDecimal | TRUE |User e-wallet balance amount. This value is not null if the value of field success is false |

## Response Codes

Expand Down
120 changes: 60 additions & 60 deletions source/includes/_e_wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,17 @@ expiration_time | Long | FALSE | Maximum expiration time (in minutes) for each e

### Response Parameters

Parameter | Type | Description
--------- | ---- | -------- |
status | Object | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
ewallet_trx_status | String(20) | Always filled with WAITING_PAYMENT if a transaction is successfully created
trx_id | String(255) | Filled with a unique transaction identifier from OY
ref_number | String(255) | Filled with a unique transaction identifier from OY, can also be used to mock callback in staging environment
customer_id | String(255) | ID generated by Partner for a specific user/customer
partner_trx_id | String(255) | ID generated by Partner for a specific transaction
amount | String(255) | Transaction amount |
ewallet_code | String(255) | The ewallet issuer that the customer will use to pay. Refer to this for the list of available ewallet codes
ewallet_url | String(255) | EWallet URL generated by the the e-wallet issuers to be used for payment purposes
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
status | Object | FALSE | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
ewallet_trx_status | String(20) | TRUE | Always filled with WAITING_PAYMENT if a transaction is successfully created
trx_id | String(255) | TRUE | Filled with a unique transaction identifier from OY
ref_number | String(255) | TRUE | Filled with a unique transaction identifier from OY, can also be used to mock callback in staging environment
customer_id | String(255) | TRUE | ID generated by Partner for a specific user/customer
partner_trx_id | String(255) | TRUE | ID generated by Partner for a specific transaction
amount | String(255) | TRUE | Transaction amount |
ewallet_code | String(255) | TRUE | The ewallet issuer that the customer will use to pay. Refer to this for the list of available ewallet codes
ewallet_url | String(255) | TRUE | EWallet URL generated by the the e-wallet issuers to be used for payment purposes


## E-Wallet Transaction Callback
Expand Down Expand Up @@ -303,19 +303,19 @@ If your settlement is non-real time, for every transaction whose payment method
}
```

Parameter | Type | Description
--------- | ---- | -------- |
success | boolean | The status of the payment and it is always set to to true
partner_trx_id | String(255) | ID generated by Partner for a specific transaction
trx_id | String(255) | Filled with a unique transaction identifier from OY
ref_number | String(255) | Filled with a unique transaction identifier from OY, can also be used to mock callback in staging environment
customer_id | String(255) | ID generated by Partner for a specific user/customer
amount | BigDecimal | Transaction amount
ewallet_code | String(255) | The ewallet issuer that the customer used to pay. Refer to this for the list of available ewallet codes
mobile_number | String(255) | Customer mobile number
success_redirect_url | String(255) | Indicates the URL of your environment (to redirect the customers back once payment has been completed in e-wallet issuers.)
settlement_time | Timestamp | The timestamp (in UTC+7) indicating when the fund will be settled to partner’s account statement, format `dd/MM/yyyy'T'HH:mm:ss.SSSZZZZ`
settlement_status | String(255) | Status of the settlement (e.g. success/waiting)
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
success | boolean | FALSE | The status of the payment and it is always set to to true
partner_trx_id | String(255) | FALSE | ID generated by Partner for a specific transaction
trx_id | String(255) | FALSE | Filled with a unique transaction identifier from OY
ref_number | String(255) | FALSE | Filled with a unique transaction identifier from OY, can also be used to mock callback in staging environment
customer_id | String(255) | FALSE | ID generated by Partner for a specific user/customer
amount | BigDecimal | FALSE | Transaction amount
ewallet_code | String(255) | FALSE | The ewallet issuer that the customer used to pay. Refer to this for the list of available ewallet codes
mobile_number | String(255) | FALSE | Customer mobile number
success_redirect_url | String(255) | FALSE | Indicates the URL of your environment (to redirect the customers back once payment has been completed in e-wallet issuers.)
settlement_time | Timestamp | FALSE | The timestamp (in UTC+7) indicating when the fund will be settled to partner’s account statement, format `dd/MM/yyyy'T'HH:mm:ss.SSSZZZZ`
settlement_status | String(255) | FALSE | Status of the settlement (e.g. success/waiting)

## Check E-Wallet Transaction Status
Use this API to check the status of an e-wallet transaction.
Expand Down Expand Up @@ -527,17 +527,17 @@ partner_trx_id | String(255) | TRUE | - | ID generated by Partner for a specific

### Response Parameters

Parameter | Type | Description
--------- | ---- | -------- |
status | Object | Status of response in Object `{code: <status_code>, message: <status_message>}`
ewallet_trx_status | String(20) | Current transaction status, refer to "E-Wallet Transaction Status" for more details
trx_id | String(255) | Filled with a unique transaction identifier from OY
customer_id | String(255) | ID generated by Partner for a specific user/customer
partner_trx_id | String(255) | ID generated by Partner for a specific transaction
amount | String(255) | Transaction Amount
ewallet_code | String(255) | The ewallet issuer that the customer will use to pay.
ewallet_url | String(255) | EWallet URL passed from the e-wallet issuers to be used for payment purposes
reason | String(255) | Reason for the status given
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
status | Object | FALSE | Status of response in Object `{code: <status_code>, message: <status_message>}`
ewallet_trx_status | String(20) | TRUE | Current transaction status, refer to "E-Wallet Transaction Status" for more details. Will not be sent if request is failed.
trx_id | String(255) | TRUE | Filled with a unique transaction identifier from OY. Will not be sent if request is failed.
customer_id | String(255) | TRUE | ID generated by Partner for a specific user/customer. Will not be sent if request is failed.
partner_trx_id | String(255) | TRUE | ID generated by Partner for a specific transaction. Will not be sent if request is failed.
amount | String(255) | FALSE | Transaction Amount
ewallet_code | String(255) | TRUE | The ewallet issuer that the customer will use to pay. Will not be sent if request is failed.
ewallet_url | String(255) | TRUE | EWallet URL passed from the e-wallet issuers to be used for payment purposes. Empty for all ovo transaction. Also empty for other ewallet if request is failed.
reason | String(255) | TRUE | Reason for the status given. Will not be sent if request is failed.

## Refund E-Wallet Transaction
Use this API to refund an e-wallet transaction that has been completed. Please refer to table [E-wallet Details](#e-wallet-details-api-e-wallet-aggregator) to see refund capability of each e-wallet vendor.
Expand Down Expand Up @@ -752,14 +752,14 @@ refund_amount | BigDecimal | TRUE | - | Amount to be refunded, must be greater t

### Response Parameters

Parameter | Type | Description
--------- | ---- | -------- |
status | Object | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
refund_id | String(255) | Filled with a unique refund identifier from OY. You will get refund ID if your request is successfully passed to e-wallet vendor. This can be used as a request parameter to call get refund status API
trx_id | String(255) | Filled with a unique transaction identifier from OY
partner_trx_id | String(255) | ID generated by Partner for a specific transaction
refund_amount | BigDecimal | Requested refund amount |
refund_status | String(255) | Filled with status of refund request, refer to "E-Wallet Refund Status" for more details
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
status | Object | FALSE | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
refund_id | String(255) | TRUE | Filled with a unique refund identifier from OY. You will get refund ID if your request is successfully passed to e-wallet vendor. This can be used as a request parameter to call get refund status API
trx_id | String(255) | TRUE | Filled with a unique transaction identifier from OY. Will not be sent if request is failed.
partner_trx_id | String(255) | TRUE | ID generated by Partner for a specific transaction. Will not be sent if request is failed.
refund_amount | BigDecimal | TRUE | Requested refund amount. Will not be sent if request is failed. |
refund_status | String(255) | TRUE | Filled with status of refund request, refer to "E-Wallet Refund Status" for more details. Will not be sent if request is failed.

## E-Wallet Refund Callback

Expand All @@ -780,12 +780,12 @@ You will receive the callback when you request to refund an e-wallet transaction
}
```

Parameter | Type | Description
--------- | ---- | -------- |
success | boolean | Filled with true if refund is successfully processed by e-wallet vendor, and false if otherwise
refund_id | String(255) | Filled with a unique refund identifier from OY
refund_status | String(255) | Status of refund request, refer to "E-Wallet Refund Status" for more details
refund_amount | BigDecimal | Requested refund amount
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
success | boolean | FALSE | Filled with true if refund is successfully processed by e-wallet vendor, and false if otherwise
refund_id | String(255) | FALSE | Filled with a unique refund identifier from OY
refund_status | String(255) | FALSE | Status of refund request, refer to "E-Wallet Refund Status" for more details
refund_amount | BigDecimal | FALSE | Requested refund amount

## Get E-Wallet Refund Status

Expand Down Expand Up @@ -973,12 +973,12 @@ refund_id | String(255) | TRUE | - | Unique refund ID, you can get this once you

### Response Parameters

Parameter | Type | Description
--------- | ---- | -------- |
status | Object | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
refund_id | String(255) | Requested e-wallet refund ID
refund_status | String(255) | Status of refund request, refer to "E-Wallet Refund Status" for more details
refund_amount | BigDecimal | Requested refund amount
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
status | Object | FALSE | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
refund_id | String(255) | TRUE | Requested e-wallet refund ID. Will not be sent if request is failed.
refund_status | String(255) | TRUE | Status of refund request, refer to "E-Wallet Refund Status" for more details. Will not be sent if request is failed.
refund_amount | BigDecimal | TRUE | Requested refund amount. Will not be sent if request is failed.

## Get List of E-Wallet Refund

Expand Down Expand Up @@ -1176,11 +1176,11 @@ partner_trx_id | String(255) | TRUE | - | ID generated by Partner for a specific

### Response Parameters

Parameter | Type | Description
--------- | ---- | -------- |
status | Object | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
total | Integer | Total items
data | Array of object | List of Object `{refund_id: <refund_id>, refund_status: <refund_status>, refund_amount: <refund_amount>}`
Parameter | Type | Nullable | Description
--------- | ---- | ----- | -------- |
status | Object | FALSE | Status of response in Object `{code: <status_code>, message: <status_message>}`. See table "Response Code" for more details
total | Integer | TRUE | Total items. Will not be sent if request is failed.
data | Array of object | TRUE | List of Object `{refund_id: <refund_id>, refund_status: <refund_status>, refund_amount: <refund_amount>}` Will not be sent if request is failed.

## E-Wallet Details

Expand Down
Loading
Loading