Example #1
0
 public function verifyChargePaymentToken(array $param)
 {
     $hasError = false;
     $param['postedParam']['type'] = CheckoutApi_Client_Constant::CHARGE_TYPE;
     $param['method'] = CheckoutApi_Client_Adapter_Constant::API_GET;
     $this->flushState();
     $isToenValid = CheckoutApi_Client_Validation_GW3::isPaymentToken($param);
     $uri = $this->getUriCharge();
     if (!$isToenValid) {
         $hasError = true;
         $this->throwException('Please provide a valid payment token ', array('param' => $param));
     } else {
         $uri = "{$uri}/{$param['paymentToken']}";
     }
     return $this->request($uri, $param, !$hasError);
 }