@@ -51,6 +51,7 @@ public function __construct(SumUpHttpClientInterface $client, AccessToken $acces
5151 * @param string $description
5252 * @param null $payFromEmail
5353 * @param null $returnURL
54+ * @param null $redirectURL
5455 *
5556 * @return \SumUp\HttpClients\Response
5657 *
@@ -60,7 +61,7 @@ public function __construct(SumUpHttpClientInterface $client, AccessToken $acces
6061 * @throws \SumUp\Exceptions\SumUpAuthenticationException
6162 * @throws \SumUp\Exceptions\SumUpSDKException
6263 */
63- public function create ($ amount , $ currency , $ checkoutRef , $ payToEmail , $ description = '' , $ payFromEmail = null , $ returnURL = null )
64+ public function create ($ amount , $ currency , $ checkoutRef , $ payToEmail , $ description = '' , $ payFromEmail = null , $ returnURL = null , $ redirectURL = null )
6465 {
6566 if (empty ($ amount ) || !is_numeric ($ amount )) {
6667 throw new SumUpArgumentException (ExceptionMessages::getMissingParamMsg ('amount ' ));
@@ -87,6 +88,9 @@ public function create($amount, $currency, $checkoutRef, $payToEmail, $descripti
8788 if (isset ($ returnURL )) {
8889 $ payload ['return_url ' ] = $ returnURL ;
8990 }
91+ if (isset ($ redirectURL )) {
92+ $ payload ['redirect_url ' ] = $ redirectURL ;
93+ }
9094 $ path = '/v0.1/checkouts ' ;
9195 $ headers = array_merge (Headers::getStandardHeaders (), Headers::getAuth ($ this ->accessToken ));
9296 return $ this ->client ->send ( 'POST ' , $ path , $ payload , $ headers );
0 commit comments