示例#1
0
 /**
  * Get card details from Worldpay token
  * @param string $token
  * @return array card details
  * */
 public function getStoredCardDetails($token = false)
 {
     if (empty($token) || !is_string($token)) {
         Error::throwError('ip', Error::$errors['orderInput']['token']);
     }
     $response = TokenService::getStoredCardDetails($token);
     if (!isset($response['paymentMethod'])) {
         Error::throwError("apierror");
     }
     return $response['paymentMethod'];
 }