iyzico / iyzipay-php

iyzipay api php client
MIT License
301 stars 87 forks source link

Sistem hatası when creating new Subscription #116

Closed FrancescoMussi closed 4 years ago

FrancescoMussi commented 4 years ago

I have been downloading and install this repo. Test single charge products are working fine. However tests with subscriptions are failing.

This is my code:

require('../app/Iyzipay/Config.php');

$request = new \Iyzipay\Request\Subscription\SubscriptionCreateProductRequest();
$request->setLocale("tr");
$request->setConversationId("1234567889");
$request->setName("subscrition1");
$request->setDescription("DescriptionOfProduct");

$result = \Iyzipay\Model\Subscription\SubscriptionProduct::create($request,Config::options());
dd($result);

This is the outcome:

SubscriptionProduct {#318 ▼
  -name: null
  -description: null
  -referenceCode: null
  -productStatus: null
  -pricingPlans: null
  -createdDate: null
  -status: "failure"
  -errorCode: "100001"
  -errorMessage: "Sistem hatası"
  -errorGroup: null
  -locale: null
  -systemTime: 1580137754176
  -conversationId: null
  -rawResult: "{"status":"failure","errorCode":"100001","errorMessage":"Sistem hatası","systemTime":1580137754176}"
}

I am using a Sandbox account. Is it this perhaps the reason?

iyzico-ci commented 4 years ago

Hi Francesco,

Could you send me the merchant Id you used on sandbox env?

We need to activate subscription first.

Thanks Caner Yazıcı Client Integration Engineer M: +90(532)440 58 36 T : +90(216)599 0100 W: www.iyzico.comhttps://www.iyzico.com/

iyzi Ödeme ve Elektronik Para Hizmetleri A.Ş. Burhaniye Mahallesi Atilla Sokak No:7 Üsküdar İstanbul

[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img1-1.jpg] [iyzico mobil uygulaması ile tüm alışverişlerin tek bir yerde!]https://www.iyzico.com/kendim-icin/iyzico-app?utm_source=mailimza&utm_medium=iyzicoapp&utm_content=iyzicoApp

[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img3-1.jpg]https://www.facebook.com/iyzico[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img4-1.jpg]https://twitter.com/iyzico_com[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img5-1.jpg]https://www.instagram.com/iyzico/[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img6-1.jpg]https://www.youtube.com/channel/UCk4iPbGOno3mTSWEvQ1Rk5Q[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img7-1.jpg]https://plus.google.com/+Iyzico[https://www.iyzico.com/blog/wp-content/uploads/2018/11/img8-1.jpg]https://www.linkedin.com/company/iyzi-payments

Bu mesaj ve ekleri, mesajda gönderildiği belirtilen kişi/kişilere özeldir ve gizlidir. Bu mesajın muhatabı olmamanıza rağmen tarafınıza ulaşmış olması halinde mesaj içeriğinin gizliliği ve bu gizlilik yükümlülüğüne uyulması zorunluluğu tarafınız için de söz konusudur. Mesaj ve eklerinde yer alan bilgilerin doğruluğu ve güncelliği konusunda iyzi Ödeme ve Elektronik Para Hizmetleri A.Ş.'nin herhangi bir sorumluluğu bulunmamaktadır. iyzi Ödeme ve Elektronik Para Hizmetleri A.Ş. mesajin ve bilgilerinin size değişikliğe uğrayarak veya geç ulaşmasından, iyzi Ödeme ve Elektronik Para Hizmetleri A.Ş. bütünlüğünün ve gizliliğinin korunamamasından, virus içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz.


From: Francesco Mussi notifications@github.com Sent: Monday, January 27, 2020 5:52 PM To: iyzico/iyzipay-php iyzipay-php@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [iyzico/iyzipay-php] Sistem hatası when creating new Subscription (#116)

I have been downloading and install this repo. Test single charge products are working fine. However tests with subscriptions are failing.

This is my code:

require('../app/Iyzipay/Config.php');

$request = new \Iyzipay\Request\Subscription\SubscriptionCreateProductRequest(); $request->setLocale("tr"); $request->setConversationId("1234567889"); $request->setName("subscrition1"); $request->setDescription("DescriptionOfProduct");

$result = \Iyzipay\Model\Subscription\SubscriptionProduct::create($request,Config::options()); dd($result);

I am using a Sandbox account. Is it this perhaps the reason?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/iyzico/iyzipay-php/issues/116?email_source=notifications&email_token=AECT5YVTLLEYIRM3D66X6DDQ73YJBA5CNFSM4KMCSMC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4II6GARQ, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AECT5YXRUQQZTRSFTTZMDPDQ73YJBANCNFSM4KMCSMCQ.

FrancescoMussi commented 4 years ago

Okay thank you for fast response. I contacted the support and they activated the subscriptions and now it's working. As a response, I get now:

RetrieveList {#323 ▼
  -totalCount: 0
  -currentPage: 1
  -pageCount: 0
  -items: []
  -status: "success"
  -errorCode: null
  -errorMessage: null
  -errorGroup: null
  -locale: null
  -systemTime: 1580210480249
  -conversationId: null
  -rawResult: "{"status":"success","systemTime":1580210480249,"data":{"totalCount":0,"currentPage":1,"pageCount":0,"items":[]}}"
}

In any case I suggest you to include this info in the Subscription docs. Because it wasn't mentioned that this module has to be activated, and I thought there was some issues with the API.

corebyte commented 1 year ago

Please mention "Subscription Module should be activated to use" on your all Developer Documents. We have spent 2 hours to resolve "100001" error.