You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config.collection_user_id = 'Your Collection User ID'
48
-
config.collection_api_secret = 'Your Collection API Key'
49
47
end
50
48
```
51
49
52
50
## Collections
53
-
The collections client can be created with the following paramaters. Note that the `COLLECTION_USER_ID` and `COLLECTION_API_SECRET` for production are provided on the MTN OVA dashboard;
51
+
The collections client can be created with the following paramaters. Note that the `COLLECTION_USER_ID` and `COLLECTION_API_SECRET` for production are provided on the MTN OVA dashboard.
An extra argument, `callback_url`, can be passed to this method, denoting the URL to the server where the callback should be sent.
89
+
90
+
## Disbursements
91
+
The disbursements client can be created with the following paramaters. The `DISBURSEMENT_USER_ID` and `DISBURSEMENT_API_SECRET` for production are provided on the MTN OVA dashboard.
config.disbursement_user_id = 'Your Disbursement User ID'
97
+
config.disbursement_api_secret = 'Your Disbursement API Key'
98
+
```
99
+
100
+
*`disbursement_primary_key`: Primary Key for the `Disbursement` product on the developer portal.
101
+
*`disbursement_user_id`: For sandbox, use the one generated with the `momoapi-ruby` command.
102
+
*`disbursement_api_secret`: For sandbox, use the one generated with the `momoapi-ruby` command.
103
+
104
+
You can create a disbursement client with the following:
105
+
106
+
```ruby
107
+
require'momoapi-ruby'
108
+
109
+
disbursement =Momoapi::Disbursement.new
110
+
```
111
+
112
+
### Methods
113
+
1.`transfer`: Used to transfer an amount from the owner’s account to a payee account. Status of the transaction can be validated by using the `get_transaction_status` method.
114
+
115
+
2.`get_transaction_status`: Retrieve transaction information using the `transaction_id` returned by `transfer`. You can invoke it at intervals until the transaction fails or succeeds. If the transaction has failed, it will throw an appropriate error.
An extra argument, `callback_url`, can be passed to this method, denoting the URL to the server where the callback should be sent.
129
+
130
+
## Remittances
131
+
The remittances client can be created with the following paramaters. The `REMITTANCES_USER_ID` and `REMITTANCES_API_SECRET` for production are provided on the MTN OVA dashboard.
config.remittance_user_id = 'Your Remittance User ID'
137
+
config.remittance_api_secret = 'Your Remittance API Key'
138
+
```
139
+
140
+
*`remittance_primary_key`: Primary Key for the `Remittance` product on the developer portal.
141
+
*`remittance_user_id`: For sandbox, use the one generated with the `momoapi-ruby` command.
142
+
*`remittance_api_secret`: For sandbox, use the one generated with the `momoapi-ruby` command.
143
+
144
+
You can create a remittance client with the following:
145
+
146
+
```ruby
147
+
require'momoapi-ruby'
148
+
149
+
remittance =Momoapi::Remittance.new
150
+
```
151
+
152
+
### Methods
153
+
1.`transfer`: Used to transfer an amount from the owner’s account to a payee account. Status of the transaction can be validated by using the `get_transaction_status` method.
154
+
155
+
2.`get_transaction_status`: Retrieve transaction information using the `transaction_id` returned by `transfer`. You can invoke it at intervals until the transaction fails or succeeds. If the transaction has failed, it will throw an appropriate error.
0 commit comments