File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -287,15 +287,15 @@ public static function oauthExchange(
287287 }
288288
289289 /**
290- * @param $oath_string
290+ * @param $oauth_string
291291 * @return mixed
292292 * @throws MailchimpException
293293 */
294- private static function requestAccessToken ($ oath_string )
294+ private static function requestAccessToken ($ oauth_string )
295295 {
296296 $ request = self ::getStaticRequest ();
297297 $ request ->setMethod ("POST " );
298- $ request ->setPayload ($ oath_string );
298+ $ request ->setPayload ($ oauth_string , false );
299299 $ request ->setBaseUrl (MailchimpConnection::TOKEN_REQUEST_URL );
300300
301301 $ connection = self ::getStaticConnection ($ request );
Original file line number Diff line number Diff line change @@ -265,11 +265,14 @@ public function setAuth()
265265 /**
266266 * Sets the payload for a request
267267 * @param mixed $payload
268+ * @param boolean $shouldSerialize
268269 * @throws MailchimpException when cant serialize payload
269270 */
270- public function setPayload ($ payload )
271+ public function setPayload ($ payload, $ shouldSerialize = true )
271272 {
272- $ payload = $ this ->serializePayload ($ payload );
273+ if ($ shouldSerialize ) {
274+ $ payload = $ this ->serializePayload ($ payload );
275+ }
273276 $ this ->payload = $ payload ;
274277 }
275278
You can’t perform that action at this time.
0 commit comments