Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/canavci2016/shopier
Shopier api ile ödeme yapma
https://github.com/canavci2016/shopier
Last synced: 3 months ago
JSON representation
Shopier api ile ödeme yapma
- Host: GitHub
- URL: https://github.com/canavci2016/shopier
- Owner: canavci2016
- Created: 2018-11-02T12:10:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T19:52:42.000Z (over 1 year ago)
- Last Synced: 2024-07-28T00:25:50.667Z (3 months ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 12
- Watchers: 0
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - canavci2016/shopier - Shopier api ile ödeme yapma (PHP)
README
# shopier
Shopier api ile ödeme yapmaShopier api kullanımı example.php dosyasında anlatılmıştır.
### NASIL INDIRILIR
```bash
composer require canavci2016/shopier
```
### Manual kullanım
```bash
require_once __DIR__ . '/../vendor/autoload.php'; // Autoload files using Composer autoload
use CanAvci\Shopier\Shopier;
use CanAvci\Shopier\BillingAddress;
use CanAvci\Shopier\ShippingAddress;
use CanAvci\Shopier\Person;define("ORDER_ID", uniqid());
define("ORDER_AMOUNT", rand(100, 4000));
define("CALLBACK_URL", "https://www.canavci.com/ccc");$shopier = new Shopier("q2eq2", "q2eq2e");
// satın alan kişinin bilgileri
$buyer = new Person;
$buyer->setName("can");
$buyer->setSurname("avci");
$buyer->setEmail("[email protected]");
$buyer->setPhone("5364778591");// fatura adresi
$billingAddress = new BillingAddress;
$billingAddress->setCountry("turkey");
$billingAddress->setCity("istanbul");
$billingAddress->setAddress("Kartaltepeme Mah");
$billingAddress->setPostcode("34200");// teslimat adresi
$shippingAddress = new ShippingAddress;
$shippingAddress->setCountry("turkey");
$shippingAddress->setCity("istanbul");
$shippingAddress->setAddress("Kartaltepeme Mah");
$shippingAddress->setPostcode("34120");$shopier->setBuyer($buyer);
$shopier->setBillingAddress($billingAddress);
$shopier->setShippingAdress($shippingAddress);$shopier->fields(ORDER_ID, ORDER_AMOUNT, CALLBACK_URL);
die($shopier->run(ORDER_ID, ORDER_AMOUNT, CALLBACK_URL));
```