$firstBasketItem->setCategory2("Accessories"); $firstBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL); $firstBasketItem->setPrice("0.3"); $firstBasketItem->setSubMerchantKey("sub merchant key"); $firstBasketItem->setSubMerchantPrice("0.27"); $basketItems[0] = $firstBasketItem; $secondBasketItem = new \Iyzipay\Model\BasketItem(); $secondBasketItem->setId("BI102"); $secondBasketItem->setName("Game code"); $secondBasketItem->setCategory1("Game"); $secondBasketItem->setCategory2("Online Game Items"); $secondBasketItem->setItemType(\Iyzipay\Model\BasketItemType::VIRTUAL); $secondBasketItem->setPrice("0.5"); $secondBasketItem->setSubMerchantKey("sub merchant key"); $secondBasketItem->setSubMerchantPrice("0.42"); $basketItems[1] = $secondBasketItem; $thirdBasketItem = new \Iyzipay\Model\BasketItem(); $thirdBasketItem->setId("BI103"); $thirdBasketItem->setName("Usb"); $thirdBasketItem->setCategory1("Electronics"); $thirdBasketItem->setCategory2("Usb / Cable"); $thirdBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL); $thirdBasketItem->setPrice("0.2"); $thirdBasketItem->setSubMerchantKey("sub merchant key"); $thirdBasketItem->setSubMerchantPrice("0.18"); $basketItems[2] = $thirdBasketItem; $request->setBasketItems($basketItems); # make request $payment = \Iyzipay\Model\Payment::create($request, Config::options()); # print result print_r($payment);
<?php require_once 'config.php'; # create request class $request = new \Iyzipay\Request\RetrievePaymentRequest(); $request->setLocale(\Iyzipay\Model\Locale::TR); $request->setConversationId("123456789"); $request->setPaymentId("1"); $request->setPaymentConversationId("123456789"); # make request $payment = \Iyzipay\Model\Payment::retrieve($request, Config::options()); # print result print_r($payment);