jigneshkaila

Untitled

Jan 11th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. public function angelleye_get_merchant_onboarding_url($baseUrl) {
  2.         try {
  3.             $redirectUrl = OpenIdSession::getAuthorizationUrl(
  4.                             $this->rest_api_return_url, array('openid', 'profile', 'address', 'email', 'phone',
  5.                         'https://uri.paypal.com/services/paypalattributes',
  6.                         'https://uri.paypal.com/services/invoicing'), null, null, null, $this->angelleye_paypal_invoicing_getAuth()
  7.             );
  8.             if (!empty($redirectUrl)) {
  9.                 $this->angelleye_set_session('return_url', $baseUrl);
  10.                 header("Location: $redirectUrl");
  11.                 exit();
  12.             }
  13.         } catch (Exception $ex) {
  14.             $baseUrl = $baseUrl . '&error=' . $ex->getMessage();
  15.             header("Location: $baseUrl");
  16.             exit();
  17.         }
  18.     }
Add Comment
Please, Sign In to add comment