Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/../vendor/markbaker/../paypal/../iyzico/iyzipay-php/samples
الملفات الموجودة في هذا الـ Path:
.
..
api_test.php
approve.php
cancel.php
cancel_with_reason.php
config.php
create_card.php
create_marketplace_payment.php
create_payment.php
create_payment_with_registered_card.php
create_payment_with_reward.php
create_sub_merchant.php
create_threeds_payment.php
delete_card.php
disapprove.php
images
initialize_apm.php
initialize_bkm.php
initialize_checkout_form.php
initialize_iyziup_form.php
initialize_iyziup_form_with_initial_consumer.php
initialize_pay_with_iyzico.php
initialize_threeds.php
initialize_threeds_with_reward.php
iyzilink_add_product_sample.php
iyzilink_delete_product_sample.php
iyzilink_retrieve_product_sample.php
iyzilink_retrieve_products_sample.php
iyzilink_update_product_sample.php
refund.php
refund_to_balance.php
refund_with_reason.php
reporting_payment_detail.php
reporting_payment_transaction.php
retrieve_apm.php
retrieve_bin.php
retrieve_bkm_result.php
retrieve_cards.php
retrieve_checkout_form_result.php
retrieve_installments.php
retrieve_iyziup_form_result.php
retrieve_loyalty.php
retrieve_pay_with_iyzico_result.php
retrieve_payment_result.php
retrieve_payout_transactions.php
retrieve_sub_merchant.php
settlement_to_balance.php
submerchant_payment_item_update.php
subscription-samples
tls_v12_test.php
ucs_init.php
update_sub_merchant.php

مشاهدة ملف: create_payment.php

<?php

require_once('config.php');

# create request class
$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);

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

# print response
print_r($payment);