Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Fix general credit method. Convert money to cents.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuurbo committed Aug 3, 2015
1 parent 67ba7c3 commit 3deeaf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/Tuurbo/Spreedly/PaymentSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function it_makes_a_general_credit($client)
$data = [
'transaction' => [
'payment_method_token' => self::PAYMENT_TOKEN,
'amount' => 10.98,
'amount' => 10.98 * 100,
'currency_code' => 'USD'
]
];
Expand Down
2 changes: 1 addition & 1 deletion src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function generalCredit($amount, $currency = null, array $data = [])
$params = [
'transaction' => [
'payment_method_token' => $this->paymentToken,
'amount' => $amount,
'amount' => $amount * 100,
'currency_code' => $currency ?: 'USD'
]
];
Expand Down

0 comments on commit 3deeaf2

Please sign in to comment.