From c4c079659ba597f76757f9b7c62d7d532f13672b Mon Sep 17 00:00:00 2001 From: Scott Connerly Date: Fri, 7 Sep 2018 16:32:13 -0500 Subject: [PATCH] Add retrieveCharge to Charge class --- src/Charge.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Charge.php b/src/Charge.php index 7c1c2b8..704a279 100644 --- a/src/Charge.php +++ b/src/Charge.php @@ -50,4 +50,17 @@ public static function chargeToken($token, $amount, $options = array()){ $options["token"] = $token; return self::chargeCard($options, $amount); } + + /* + * + * Retrieve a Charge + * + * @param $chargeID string + * @return JSON Object + */ + + public static function retrieveCharge($chargeID){ + $response = PaymentSpring::makeRequest("charge/".$chargeID); + return json_decode($response); + } }