2017 © Pedro Peláez
 

library iyzipay-php

iyzipay api php client

image

iyzico/iyzipay-php

iyzipay api php client

  • Wednesday, July 18, 2018
  • by iyzico
  • Repository
  • 67 Watchers
  • 108 Stars
  • 24,576 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 35 Forks
  • 5 Open issues
  • 37 Versions
  • 10 % Grown

The README.md

iyzipay-php

Latest Stable Version Coverage Status, (*1)

You can sign up for an iyzico account at https://iyzico.com, (*2)

Requirements

PHP 7.4 and later., (*3)

Note

Minimum TLS v1.2 will be supported after March 2018. Please upgrade your openssl version to minimum 1.0.1. If you have any questions, please open an issue on Github or contact us at integration@iyzico.com., (*4)

Installation

Composer

You can install the bindings via Composer. Run the following command:, (*5)

composer require iyzico/iyzipay-php

To use the bindings, use Composer's autoload:, (*6)

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the IyzipayBootstrap.php file., (*7)

require_once('/path/to/iyzipay-php/IyzipayBootstrap.php');

Usage

$options = new \Iyzipay\Options();
$options->setApiKey("your api key");
$options->setSecretKey("your secret key");
$options->setBaseUrl("https://sandbox-api.iyzipay.com");

$request = new \Iyzipay\Request\CreatePaymentRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPrice("1");
$request->setPaidPrice("1.2");
$request->setCurrency(\Iyzipay\Model\Currency::TL);
$request->setInstallment(1);
$request->setBasketId("B67832");
$request->setPaymentChannel(\Iyzipay\Model\PaymentChannel::WEB);
$request->setPaymentGroup(\Iyzipay\Model\PaymentGroup::PRODUCT);

$paymentCard = new \Iyzipay\Model\PaymentCard();
$paymentCard->setCardHolderName("John Doe");
$paymentCard->setCardNumber("5528790000000008");
$paymentCard->setExpireMonth("12");
$paymentCard->setExpireYear("2030");
$paymentCard->setCvc("123");
$paymentCard->setRegisterCard(0);
$request->setPaymentCard($paymentCard);

$buyer = new \Iyzipay\Model\Buyer();
$buyer->setId("BY789");
$buyer->setName("John");
$buyer->setSurname("Doe");
$buyer->setGsmNumber("+905350000000");
$buyer->setEmail("email@email.com");
$buyer->setIdentityNumber("74300864791");
$buyer->setLastLoginDate("2015-10-05 12:43:35");
$buyer->setRegistrationDate("2013-04-21 15:12:09");
$buyer->setRegistrationAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$buyer->setIp("85.34.78.112");
$buyer->setCity("Istanbul");
$buyer->setCountry("Turkey");
$buyer->setZipCode("34732");
$request->setBuyer($buyer);

$shippingAddress = new \Iyzipay\Model\Address();
$shippingAddress->setContactName("Jane Doe");
$shippingAddress->setCity("Istanbul");
$shippingAddress->setCountry("Turkey");
$shippingAddress->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$shippingAddress->setZipCode("34742");
$request->setShippingAddress($shippingAddress);

$billingAddress = new \Iyzipay\Model\Address();
$billingAddress->setContactName("Jane Doe");
$billingAddress->setCity("Istanbul");
$billingAddress->setCountry("Turkey");
$billingAddress->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$billingAddress->setZipCode("34742");
$request->setBillingAddress($billingAddress);

$basketItems = array();
$firstBasketItem = new \Iyzipay\Model\BasketItem();
$firstBasketItem->setId("BI101");
$firstBasketItem->setName("Binocular");
$firstBasketItem->setCategory1("Collectibles");
$firstBasketItem->setCategory2("Accessories");
$firstBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL);
$firstBasketItem->setPrice("0.3");
$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");
$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");
$basketItems[2] = $thirdBasketItem;
$request->setBasketItems($basketItems);

$payment = \Iyzipay\Model\Payment::create($request, $options);

See other samples under samples directory., (*8)

Development

Install dependencies:, (*9)

``` bash composer install, (*10)


### Mock test cards Test cards that can be used to simulate a *successful* payment: Card Number | Bank | Card Type ----------- | ---- | --------- 5890040000000016 | Akbank | Master Card (Debit) 5526080000000006 | Akbank | Master Card (Credit) 4766620000000001 | Denizbank | Visa (Debit) 4603450000000000 | Denizbank | Visa (Credit) 4729150000000005 | Denizbank Bonus | Visa (Credit) 4987490000000002 | Finansbank | Visa (Debit) 5311570000000005 | Finansbank | Master Card (Credit) 9792020000000001 | Finansbank | Troy (Debit) 9792030000000000 | Finansbank | Troy (Credit) 5170410000000004 | Garanti Bankası | Master Card (Debit) 5400360000000003 | Garanti Bankası | Master Card (Credit) 374427000000003 | Garanti Bankası | American Express 4475050000000003 | Halkbank | Visa (Debit) 5528790000000008 | Halkbank | Master Card (Credit) 4059030000000009 | HSBC Bank | Visa (Debit) 5504720000000003 | HSBC Bank | Master Card (Credit) 5892830000000000 | Türkiye İş Bankası | Master Card (Debit) 4543590000000006 | Türkiye İş Bankası | Visa (Credit) 4910050000000006 | Vakıfbank | Visa (Debit) 4157920000000002 | Vakıfbank | Visa (Credit) 5168880000000002 | Yapı ve Kredi Bankası | Master Card (Debit) 5451030000000000 | Yapı ve Kredi Bankası | Master Card (Credit) *Cross border* test cards: Card Number | Country ----------- | ------- 4054180000000007 | Non-Turkish (Debit) 5400010000000004 | Non-Turkish (Credit) Test cards to get specific *error* codes: Card Number | Description ----------- | ----------- 5406670000000009 | Success but cannot be cancelled, refund or post auth 4111111111111129 | Not sufficient funds 4129111111111111 | Do not honour 4128111111111112 | Invalid transaction 4127111111111113 | Lost card 4126111111111114 | Stolen card 4125111111111115 | Expired card 4124111111111116 | Invalid cvc2 4123111111111117 | Not permitted to card holder 4122111111111118 | Not permitted to terminal 4121111111111119 | Fraud suspect 4120111111111110 | Pickup card 4130111111111118 | General error 4131111111111117 | Success but mdStatus is 0 4141111111111115 | Success but mdStatus is 4 4151111111111112 | 3dsecure initialize failed ### Mock APM Accounts Mock APM Accounts that can be used to simulate a payment with alternative payment method: Account Holder Name | Description ------------------- | ----------- success | Succeeded payment after succeeded initialize fail-after-init | Failed payment after succeeded initialize error | Failed initialize # Testing Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite: ```bash ./vendor/bin/phpunit

Or to run an individual test file:, (*11)

./vendor/bin/phpunit tests/Iyzipay/Tests/Model/PaymentTest.php

Test file is testing..., (*12)

The Versions

18/07 2018

dev-master

9999999-dev https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

18/07 2018

v2.0.40

2.0.40.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

20/12 2017

v2.0.39

2.0.39.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

17/12 2017

v2.0.38

2.0.38.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

12/10 2017

v2.0.37

2.0.37.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

21/07 2017

v2.0.36

2.0.36.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

12/07 2017

v2.0.35

2.0.35.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

05/07 2017

v2.0.34

2.0.34.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

05/07 2017

v2.0.33

2.0.33.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

01/07 2017

v2.0.30

2.0.30.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

30/06 2017

v2.0.29

2.0.29.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

02/06 2017

dev-develop

dev-develop https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

02/06 2017

v2.0.28

2.0.28.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

02/06 2017

v2.0.27

2.0.27.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

07/03 2017

v2.0.26

2.0.26.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

09/11 2016

v2.0.25

2.0.25.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

07/09 2016

v2.0.24

2.0.24.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

04/09 2016

v2.0.23

2.0.23.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

17/08 2016

v2.0.22

2.0.22.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

11/08 2016

v2.0.21

2.0.21.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

18/07 2016

v2.0.20

2.0.20.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

08/07 2016

v2.0.19

2.0.19.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

05/07 2016

v2.0.18

2.0.18.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

16/06 2016

v2.0.17

2.0.17.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

15/06 2016

v2.0.16

2.0.16.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

03/06 2016

v2.0.15

2.0.15.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

01/06 2016

v1.0.12

1.0.12.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

22/05 2016

v1.0.11

1.0.11.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

04/05 2016

v1.0.9

1.0.9.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

14/04 2016

v1.0.8

1.0.8.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

04/04 2016

v1.0.7

1.0.7.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

24/03 2016

v1.0.6

1.0.6.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

22/03 2016

v1.0.5

1.0.5.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

25/02 2016

v1.0.4

1.0.4.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

23/02 2016

v1.0.3

1.0.3.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

22/02 2016

v1.0.2

1.0.2.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php

22/02 2016

v1.0.1

1.0.1.0 https://www.iyzico.com

iyzipay api php client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

payment processing iyzico iyzipay iyzico.com iyzipay php iyzipay api iyzipay api php client iyzipay api php