예제 #1
0
파일: Manager.php 프로젝트: gpupo/stelo-sdk
 protected function isSuccess(Response $response)
 {
     if ($response->getHttpStatusCode() === 200 || $response->getHttpStatusCode() === 202) {
         return true;
     }
     return false;
 }
예제 #2
0
파일: Manager.php 프로젝트: gpupo/adyen-sdk
 protected function processExecute(Request $request, Response $response)
 {
     if (300 > $response->getHttpStatusCode()) {
         $decorator = $this->resolveDecorator($request);
     } else {
         $decorator = $this->getFullyQualifiedDecoratorName('ProblematicDecorator');
     }
     $data = $response->getData()->toArray();
     $instance = new $decorator($data);
     $instance->setCode($response->getHttpStatusCode());
     return $instance;
 }