Inheritance: extends ApiResource
Ejemplo n.º 1
0
 public function mapResourceFrom(IyzipayResource $resource, $jsonObject)
 {
     if (isset($jsonObject->status)) {
         $resource->setStatus($jsonObject->status);
     }
     if (isset($jsonObject->conversationId)) {
         $resource->setConversationId($jsonObject->conversationId);
     }
     if (isset($jsonObject->errorCode)) {
         $resource->setErrorCode($jsonObject->errorCode);
     }
     if (isset($jsonObject->errorMessage)) {
         $resource->setErrorMessage($jsonObject->errorMessage);
     }
     if (isset($jsonObject->errorGroup)) {
         $resource->setErrorGroup($jsonObject->errorGroup);
     }
     if (isset($jsonObject->locale)) {
         $resource->setLocale($jsonObject->locale);
     }
     if (isset($jsonObject->systemTime)) {
         $resource->setSystemTime($jsonObject->systemTime);
     }
     if (isset($this->rawResult)) {
         $resource->setRawResult($this->rawResult);
     }
     return $resource;
 }
Ejemplo n.º 2
0
 public static function retrieve(RetrieveInstallmentInfoRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/payment/iyzipos/installment/html/horizontal", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return InstallmentHtmlMapper::create($rawResult)->jsonDecode()->mapInstallmentHtml(new InstallmentHtml());
 }
Ejemplo n.º 3
0
 public static function create(CreateBkmInitializeRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/payment/bkm/initialize", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return BkmInitializeMapper::create($rawResult)->jsonDecode()->mapBkmInitialize(new BkmInitialize());
 }
Ejemplo n.º 4
0
 public static function create(CreateBasicPaymentRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/payment/3dsecure/initialize/basic", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return BasicThreedsInitializeMapper::create($rawResult)->jsonDecode()->mapBasicThreedsInitialize(new BasicThreedsInitialize());
 }
Ejemplo n.º 5
0
 public static function retrieve(Options $options)
 {
     $rawResult = parent::httpClient()->get($options->getBaseUrl() . "/payment/test");
     return IyzipayResourceMapper::create($rawResult)->jsonDecode()->mapResource(new IyzipayResource());
 }
Ejemplo n.º 6
0
 public static function retrieve(RetrieveBinNumberRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/payment/bin/check", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return BinNumberMapper::create($rawResult)->jsonDecode()->mapBinNumber(new BinNumber());
 }
Ejemplo n.º 7
0
 public static function delete(DeleteCardRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->delete($options->getBaseUrl() . "/cardstorage/card", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return CardMapper::create($rawResult)->jsonDecode()->mapCard(new Card());
 }
 public static function create(CreateCrossBookingRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/crossbooking/send", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return CrossBookingToSubMerchantMapper::create($rawResult)->jsonDecode()->mapCrossBookingToSubMerchant(new CrossBookingToSubMerchant());
 }
Ejemplo n.º 9
0
 public static function retrieve(RetrieveCardListRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/cardstorage/cards", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return CardListMapper::create($rawResult)->jsonDecode()->mapCardList(new CardList());
 }
Ejemplo n.º 10
0
 public static function create(CreateCancelRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/payment/cancel", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return CancelMapper::create($rawResult)->jsonDecode()->mapCancel(new Cancel());
 }
 public static function retrieve(RetrieveTransactionsRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/reporting/settlement/payoutcompleted", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return PayoutCompletedTransactionListMapper::create($rawResult)->jsonDecode()->mapPayoutCompletedTransactionList(new PayoutCompletedTransactionList());
 }
Ejemplo n.º 12
0
 public static function retrieve(RetrieveSubMerchantRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/onboarding/submerchant/detail", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return SubMerchantMapper::create($rawResult)->jsonDecode()->mapSubMerchant(new SubMerchant());
 }
Ejemplo n.º 13
0
 public static function create(CreateApprovalRequest $request, Options $options)
 {
     $rawResult = parent::httpClient()->post($options->getBaseUrl() . "/payment/iyzipos/item/disapprove", parent::getHttpHeaders($request, $options), $request->toJsonString());
     return DisapprovalMapper::create($rawResult)->jsonDecode()->mapDisapproval(new Disapproval());
 }