1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| # First we create a client object with our API key.
# This is an example key. Use your own API key here.
client = PayPro::Client.new('YOUR_API_KEY')
# Set the command to `refund`.
client.command = 'refund'
client.params = {
# Set the id of the subscription you want to refund.
sale_id: 123456,
# Set the sequence number of the installment you want to refund.
sequence_number: 4,
# Set the amount you want to refund.
amount: 500
}
# Execute the command and store the response.
response = client.execute
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| <?
// First we create a client object with our API key.
// This is an example key. Use your own API key here.
$client = \PayPro\Client("YOUR_API_KEY");
// Set the command to `refund`.
$client->setCommand("refund");
$client->setParams([
// Set the id of the subscription you want to refund.
"sale_id" => 123456,
// Set the sequence number of the installment you want to refund.
"sequence_number" => 4,
// Set the amount you want to refund.
"amount" => 500
]);
// Execute the command and store the response.
$response = $client.execute();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| # First we create a client object with our API key.
# This is an example key. Use your own API key here.
client = Client('YOUR_API_KEY')
# Set the command to `refund`.
client.setCommand('refund')
client.setParams({
# Set the id of the subscription you want to refund.
'sale_id': 123456,
# Set the sequence number of the installment you want to refund.
'sequence_number': 4,
# Set the amount you want to refund.
'amount': 500
})
# Execute the command and store the response.
response = client.execute()
|