From 3d4734586afa563b0cd383926b5eb1252ffb9734 Mon Sep 17 00:00:00 2001 From: Richard Quadling Date: Tue, 4 Feb 2014 11:57:36 +0000 Subject: [PATCH] Update Client.php Allow the redirect_uri endpoint to be supplied with the construction of the GoCardless_Client. --- lib/GoCardless/Client.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/GoCardless/Client.php b/lib/GoCardless/Client.php index 9a72d99..7b4846c 100644 --- a/lib/GoCardless/Client.php +++ b/lib/GoCardless/Client.php @@ -86,6 +86,12 @@ public function __construct($account_details) { $this->base_url = self::$base_urls[GoCardless::$environment]; } + // Take redirect_uri from array + if (isset($account_details['redirect_uri'])) { + $this->redirect_uri = $account_details['redirect_uri']; + unset($account_details['redirect_uri']); + } + } /**