Giriş yapmadınız.

#1 Yanıt: Laravel 5.x Yardım » İyzico entegrasyon sorunu » 10.02.2019 17:11:20

Yardimlariniz icin tesekkurler dogru yontem bumudur bilmiyorum ama desteginizle asagidaki gibi yapinca sonucu aldim.
Selamlar
Nuri

$pay = new PaymentService();
       $pay->IyzicoRequest(6, $token);
     
       $payment = \Iyzipay\Model\CheckoutForm ::retrieve($pay->IRequest, $pay->IOptions);
      
       dd($payment);

SONUC

CheckoutForm {#302 ▼
  -token: "3585fdee-8101-49df-80a0-cbd48321a9b3"
  -callbackUrl: "http://127.0.0.1:8000/successful"
  -price: 86.8
  -paidPrice: 86.8
  -installment: 1
  -currency: "TRY"
  -paymentId: "11232792"
  -paymentStatus: "SUCCESS"
  -fraudStatus: 1
  -merchantCommissionRate: 0.0
  -merchantCommissionRateAmount: 0.0
  -iyziCommissionRateAmount: 2.2785
  -iyziCommissionFee: 0.25
  -cardType: "CREDIT_CARD"
  -cardAssociation: "MASTER_CARD"
  -cardFamily: "Cardfinans"
  -cardToken: "8kH/9psZ8iYc6/F94gHSew+lZrI="
  -cardUserKey: "uZt42FhRpETzeN+ho0WYLcStHBk="
  -binNumber: "531157"
  -basketId: "6"
  -paymentItems: array:1 [▼
    0 => PaymentItem {#306 ▼
      -itemId: "6"
      -paymentTransactionId: "11887733"
      -transactionStatus: 2
      -price: 86.8
      -paidPrice: 86.8
      -merchantCommissionRate: 0.0
      -merchantCommissionRateAmount: 0.0
      -iyziCommissionRateAmount: 2.2785
      -iyziCommissionFee: 0.25
      -blockageRate: 10.0
      -blockageRateAmountMerchant: 8.68
      -blockageRateAmountSubMerchant: 0.0
      -blockageResolvedDate: "2019-02-16 14:43:34"
      -subMerchantKey: null
      -subMerchantPrice: 0.0
      -subMerchantPayoutRate: 0.0
      -subMerchantPayoutAmount: 0.0
      -merchantPayoutAmount: 75.5915
      -convertedPayout: ConvertedPayout {#308 ▶}
    }
  ]
  -connectorName: null
  -authCode: "927447"
  -phase: "AUTH"
  -lastFourDigits: "0005"
  -posOrderId: null
  -status: "success"
  -errorCode: null
  -errorMessage: null
  -errorGroup: null
  -locale: "tr"
  -systemTime: 1549811348643
  -conversationId: "6"
  -rawResult: "{"status":"success","locale":"tr","systemTime":1549811348643,"conversationId":"6","price":86.80000000,"paidPrice":86.80000000,"installment":1,"paymentId":"11232 ▶"
}

#2 Yanıt: Laravel 5.x Yardım » İyzico entegrasyon sorunu » 10.02.2019 09:31:02

Evet iyzipay-php temelini kullanmaya celisiyorum.
Sizin verdiginiz kodu deneyince su hatayi aliyorum

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_RECOVERABLE_ERROR)
Argument 1 passed to Iyzipay\Model\Payment::retrieve() must be an instance of Iyzipay\Request\RetrievePaymentRequest, instance of Iyzipay\Request\RetrieveCheckoutFormRequest given, called in /Users/gnexlab_imac/Sites/3DFiyatServer/web/3DFiyatWeb/app/Http/Controllers/iyzicoFormController.php on line 99

Adamlarda burada https://dev.iyzipay.com/tr/odeme-formu/ … rmu-sonucu
asagidaki kodu ornek gosteriyorlar.

$request = new \Iyzipay\Request\RetrieveCheckoutFormRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setToken("token");

$checkoutForm = \Iyzipay\Model\CheckoutForm::retrieve($request, Config::options());

Cok kotu takildim kaldim.

#3 Yanıt: Laravel/Lumen İle Yapılmış Uygulamalar » Laravel E-Ticaret + Iyzico Entegre » 09.02.2019 22:24:53

Anil Bey,
Benim icin cok yolgosterici oldu calismaniz ozellikle iyzico entegrasyonunda. Yanliz
odeme basariyla tamamlaninca gelen callback fonksiyonunda tokeni gonderip basarili bir sonuc dondumu diye bakan asagidaki fonkssiyonda

 public function pay()
    {

        $token   = session('_token');
        $orderNo = session('order_no');

        $pay = new PaymentService();
        $pay->IyzicoRequest($orderNo, $token);

        dd($pay);

$pay i ekrana basinca asagidaki sekilde ici pekte dolu olmayan sekilde geliyor. Beim kodumda da ayni sey olunca sizinkine baktim ama sizde de dogru deger donmuyor gibi. Olmasi gereken donus postman ile apiyi durttugumde en alttaki gibi olmasi gerekmez miydi? yorumlarinizi bekliyorum.
Selamlar
Nuri

LARAVEL

+IRequest: RetrieveCheckoutFormRequest {#431 ▼
    -token: "zE76Fk3hffjfT84mcATdBmubeglp9KNr8rXSkWM8"
    -locale: "tr"
    -conversationId: 8609
  }
  +ICheckOut: CheckoutForm {#429 ▶}
  +IForm: CreateCheckoutFormInitializeRequest {#379 ▼
    -price: null
    -paidPrice: null
    -basketId: null
    -paymentGroup: "PRODUCT"
    -paymentSource: null
    -currency: "TRY"
    -buyer: Buyer {#120 ▶}
    -shippingAddress: Address {#421 ▼
      -address: null
      -zipCode: null
      -contactName: null
      -city: null
      -country: null
    }
    -billingAddress: Address {#422 ▼
      -address: null
      -zipCode: null
      -contactName: null
      -city: null
      -country: null
    }
    -basketItems: array:1 [▼
      0 => BasketItem {#423 ▼
        -id: null
        -price: null
        -name: "Binocular"
        -category1: "Collectibles"
        -category2: null
        -itemType: "PHYSICAL"
        -subMerchantKey: null
        -subMerchantPrice: null
      }
    ]
    -callbackUrl: "http://127.0.0.1:8000/successful"
    -forceThreeDS: null
    -cardUserKey: null
    -posOrderId: null
    -enabledInstallments: array:4 [▶]
    -locale: "en"
    -conversationId: null
  }
  +IShipping: Address {#421 ▶}
  +IBuyer: Buyer {#120 ▼
    -id: null
    -name: null
    -surname: null
    -identityNumber: "51117"
    -email: null
    -gsmNumber: null
    -registrationDate: "2019-02-09 20:17:08"
    -lastLoginDate: "2019-02-09 20:17:08"
    -registrationAddress: null
    -city: null
    -country: null
    -zipCode: null
    -ip: "127.0.0.1"
  }
  +IBilling: Address {#422 ▶}
  +FBasketItems: BasketItem {#423 ▶}
  +checkoutFormInitialize: CheckoutFormInitialize {#424 ▼
    -token: null
    -checkoutFormContent: null
    -tokenExpireTime: null
    -paymentPageUrl: null
    -status: null
    -errorCode: null
    -errorMessage: null
    -errorGroup: null
    -locale: null
    -systemTime: null
    -conversationId: null
    -rawResult: null
  }
}

POSTMAN

{
    "status": "success",
    "locale": "tr",
    "systemTime": 1549726096707,
    "conversationId": "6",
    "price": 86.8,
    "paidPrice": 86.8,
    "installment": 1,
    "paymentId": "11232792",
    "fraudStatus": 1,
    "merchantCommissionRate": 0,
    "merchantCommissionRateAmount": 0,
    "iyziCommissionRateAmount": 2.2785,
    "iyziCommissionFee": 0.25,
    "cardType": "CREDIT_CARD",
    "cardAssociation": "MASTER_CARD",
    "cardFamily": "Cardfinans",
    "cardToken": "8kH/9psZ8iYc6/F94gHSew+lZrI=",
    "cardUserKey": "uZt42FhRpETzeN+ho0WYLcStHBk=",
    "binNumber": "531157",
    "lastFourDigits": "0005",
    "basketId": "6",
    "currency": "TRY",
    "itemTransactions": [
        {
            "itemId": "6",
            "paymentTransactionId": "11887733",
            "transactionStatus": 2,
            "price": 86.8,
            "paidPrice": 86.8,
            "merchantCommissionRate": 0,
            "merchantCommissionRateAmount": 0,
            "iyziCommissionRateAmount": 2.2785,
            "iyziCommissionFee": 0.25,
            "blockageRate": 10,
            "blockageRateAmountMerchant": 8.68,
            "blockageRateAmountSubMerchant": 0,
            "blockageResolvedDate": "2019-02-16 14:43:34",
            "subMerchantPrice": 0,
            "subMerchantPayoutRate": 0,
            "subMerchantPayoutAmount": 0,
            "merchantPayoutAmount": 75.5915,
            "convertedPayout": {
                "paidPrice": 86.8,
                "iyziCommissionRateAmount": 2.2785,
                "iyziCommissionFee": 0.25,
                "blockageRateAmountMerchant": 8.68,
                "blockageRateAmountSubMerchant": 0,
                "subMerchantPayoutAmount": 0,
                "merchantPayoutAmount": 75.5915,
                "iyziConversionRate": 0,
                "iyziConversionRateAmount": 0,
                "currency": "TRY"
            }
        }
    ],
    "authCode": "927447",
    "phase": "AUTH",
    "hostReference": "mock00005iyzihostrfn",
    "token": "3585fdee-8101-49df-80a0-cbd48321a9b3",
    "callbackUrl": "http://127.0.0.1:8000/successful",
    "paymentStatus": "SUCCESS"
}

#4 Yanıt: Laravel 5.x Yardım » İyzico entegrasyon sorunu » 09.02.2019 21:48:07

  
        $token = '3585fdee-8101-49df-80a0-cbd48321a9b3';

        $pay = new PaymentService();
        $pay->IyzicoRequest(6, $token);
      
        dd($pay->ICheckOut);

seklinde ekrana basincada bu geldi


CheckoutForm {#305 ▼
  -token: null
  -callbackUrl: null
  -price: null
  -paidPrice: null
  -installment: null
  -currency: null
  -paymentId: null
  -paymentStatus: null
  -fraudStatus: null
  -merchantCommissionRate: null
  -merchantCommissionRateAmount: null
  -iyziCommissionRateAmount: null
  -iyziCommissionFee: null
  -cardType: null
  -cardAssociation: null
  -cardFamily: null
  -cardToken: null
  -cardUserKey: null
  -binNumber: null
  -basketId: null
  -paymentItems: null
  -connectorName: null
  -authCode: null
  -phase: null
  -lastFourDigits: null
  -posOrderId: null
  -status: null
  -errorCode: null
  -errorMessage: null
  -errorGroup: null
  -locale: null
  -systemTime: null
  -conversationId: null
  -rawResult: null
}

#5 Yanıt: Laravel 5.x Yardım » İyzico entegrasyon sorunu » 09.02.2019 21:45:22

galiba hakisiniz ama

        $pay = new PaymentService();
        $pay->IyzicoRequest($orderNo, $token);

kodundaki IyzicoRequest bunu yapmasini bekliyordum. bu fonksiyon PaymentService de su sekilde

public function IyzicoRequest($sessionOrderNo = null, $token = null)
    {
        $this->IRequest = new RetrieveCheckoutFormRequest();
        $this->IRequest->setLocale(Locale::TR);
        $this->IRequest->setConversationId($sessionOrderNo);
        $this->IRequest->setToken($token);

        $this->ICheckOut = new CheckoutForm();
        $this->ICheckOut::retrieve($this->IRequest, $this->IOptions);
        

    }

bir return dondurmedigini goruyorum acaba cevabi public olarak tanimlanmis ICheckOut da mi kaliyor.

#6 Yanıt: Laravel 5.x Yardım » İyzico entegrasyon sorunu » 09.02.2019 21:17:33

Selamlar,

Burada yazilanlardan cok faydalandim. Benzer sorunlari asmama yardimci oldu Herkese tesekkurler ediyorum.

Benim sorunum su:
Odeme basarili oluyor ve iyzicodan bana bir token geliyor. Bu tokenla gerceklesen odeme hakkinda detay bilgi ve basarili olup olmadigini ogrenmeniz icin bir api end point var.
gelen tokeni iyzico postman orneklerine koyup bilgiyi istedigimde asagida postman basligi altinda gelen cevap donuyor.
ben larvelden ayni tokeni

$pay = new PaymentService();
$pay->IyzicoRequest($order_id, $token);

seklinde istedigimde ise asagidaki laravel basligindaki cevap geliyor. Nedeni ne olabilir postamndaki gibi bir cevap niye alamiyorum.

Yardimci olan herkese tesekkurler.

POSTMAN

{
    "status": "success",
    "locale": "tr",
    "systemTime": 1549726096707,
    "conversationId": "6",
    "price": 86.8,
    "paidPrice": 86.8,
    "installment": 1,
    "paymentId": "11232792",
    "fraudStatus": 1,
    "merchantCommissionRate": 0,
    "merchantCommissionRateAmount": 0,
    "iyziCommissionRateAmount": 2.2785,
    "iyziCommissionFee": 0.25,
    "cardType": "CREDIT_CARD",
    "cardAssociation": "MASTER_CARD",
    "cardFamily": "Cardfinans",
    "cardToken": "8kH/9psZ8iYc6/F94gHSew+lZrI=",
    "cardUserKey": "uZt42FhRpETzeN+ho0WYLcStHBk=",
    "binNumber": "531157",
    "lastFourDigits": "0005",
    "basketId": "6",
    "currency": "TRY",
    "itemTransactions": [
        {
            "itemId": "6",
            "paymentTransactionId": "11887733",
            "transactionStatus": 2,
            "price": 86.8,
            "paidPrice": 86.8,
            "merchantCommissionRate": 0,
            "merchantCommissionRateAmount": 0,
            "iyziCommissionRateAmount": 2.2785,
            "iyziCommissionFee": 0.25,
            "blockageRate": 10,
            "blockageRateAmountMerchant": 8.68,
            "blockageRateAmountSubMerchant": 0,
            "blockageResolvedDate": "2019-02-16 14:43:34",
            "subMerchantPrice": 0,
            "subMerchantPayoutRate": 0,
            "subMerchantPayoutAmount": 0,
            "merchantPayoutAmount": 75.5915,
            "convertedPayout": {
                "paidPrice": 86.8,
                "iyziCommissionRateAmount": 2.2785,
                "iyziCommissionFee": 0.25,
                "blockageRateAmountMerchant": 8.68,
                "blockageRateAmountSubMerchant": 0,
                "subMerchantPayoutAmount": 0,
                "merchantPayoutAmount": 75.5915,
                "iyziConversionRate": 0,
                "iyziConversionRateAmount": 0,
                "currency": "TRY"
            }
        }
    ],
    "authCode": "927447",
    "phase": "AUTH",
    "hostReference": "mock00005iyzihostrfn",
    "token": "3585fdee-8101-49df-80a0-cbd48321a9b3",
    "callbackUrl": "http://127.0.0.1:8000/successful",
    "paymentStatus": "SUCCESS"
}

LARAVEL

PaymentService {#291 ▼
  +IOptions: Options {#286 ▼
    -apiKey: "sandbox-ZZ9UX8bjutMeetSiVCsjAeZKtHagMoxe"
    -secretKey: "sandbox-OayW0wvAw0ufRpZCaDE6RmPcB0CTMvsO"
    -baseUrl: "https://sandbox-api.iyzipay.com"
  }
  +IRequest: RetrieveCheckoutFormRequest {#305 ▼
    -token: "3585fdee-8101-49df-80a0-cbd48321a9b3"
    -locale: "tr"
    -conversationId: 6
  }
  +ICheckOut: CheckoutForm {#303 ▼
    -token: null
    -callbackUrl: null
    -price: null
    -paidPrice: null
    -installment: null
    -currency: null
    -paymentId: null
    -paymentStatus: null
    -fraudStatus: null
    -merchantCommissionRate: null
    -merchantCommissionRateAmount: null
    -iyziCommissionRateAmount: null
    -iyziCommissionFee: null
    -cardType: null
    -cardAssociation: null
    -cardFamily: null
    -cardToken: null
    -cardUserKey: null
    -binNumber: null
    -basketId: null
    -paymentItems: null
    -connectorName: null
    -authCode: null
    -phase: null
    -lastFourDigits: null
    -posOrderId: null
    -status: null
    -errorCode: null
    -errorMessage: null
    -errorGroup: null
    -locale: null
    -systemTime: null
    -conversationId: null
    -rawResult: null
  }
  +IForm: CreateCheckoutFormInitializeRequest {#287 ▼
    -price: null
    -paidPrice: null
    -basketId: null
    -paymentGroup: "PRODUCT"
    -paymentSource: null
    -currency: "TRY"
    -buyer: Buyer {#294 ▶}
    -shippingAddress: Address {#295 ▶}
    -billingAddress: Address {#296 ▶}
    -basketItems: array:1 [▼
      0 => BasketItem {#297 ▶}
    ]
    -callbackUrl: "http://127.0.0.1:8000/successful"
    -forceThreeDS: null
    -cardUserKey: null
    -posOrderId: null
    -enabledInstallments: array:4 [▼
      0 => 2
      1 => 3
      2 => 6
      3 => 9
    ]
    -debitCardAllowed: null
    -locale: "tr"
    -conversationId: null
  }
  +IShipping: Address {#295 ▼
    -address: null
    -zipCode: null
    -contactName: null
    -city: null
    -country: null
  }
  +IBuyer: Buyer {#294 ▼
    -id: null
    -name: null
    -surname: null
    -identityNumber: "51117"
    -email: null
    -gsmNumber: null
    -registrationDate: "2019-02-09 19:00:39"
    -lastLoginDate: "2019-02-09 19:00:39"
    -registrationAddress: null
    -city: null
    -country: null
    -zipCode: null
    -ip: "127.0.0.1"
  }
  +IBilling: Address {#296 ▼
    -address: null
    -zipCode: null
    -contactName: null
    -city: null
    -country: null
  }
  +FBasketItems: BasketItem {#297 ▼
    -id: null
    -price: null
    -name: "Binocular"
    -category1: "Collectibles"
    -category2: null
    -itemType: "PHYSICAL"
    -subMerchantKey: null
    -subMerchantPrice: null
  }
  +checkoutFormInitialize: CheckoutFormInitialize {#298 ▼
    -token: null
    -checkoutFormContent: null
    -tokenExpireTime: null
    -paymentPageUrl: null
    -status: null
    -errorCode: null
    -errorMessage: null
    -errorGroup: null
    -locale: null
    -systemTime: null
    -conversationId: null
    -rawResult: null
  }
}

Forum alt kısmı

Uygulama FluxBB