2017 © Pedro Peláez
 

library payments

image

weblebby/payments

  • Sunday, April 23, 2017
  • by davutkmbr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Payments

İçerisinde bulunan ödeme yöntemlerinin PHP'ye kolay entegre edilebilmesi için hazırlandı., (*1)


Kurulum

Composer ile:, (*2)

$ composer require weblebby/payments

Manuel:, (*3)

Dosyaları indirin, src klasörünün içindeki dosyaları alıp sayfanıza dahil edin.

Kullanım

 '{BATIHOST_USER_ID}',
  'secret' => '{BATIHOST_GUVENLIK_KODU}'
];

$payment = new BatigamePayment($config);
```

HTML İçin Form Oluşturmak

```php
$payment->htmlForm->success_url = '{ODEME_OLDU_URL}';
$payment->htmlForm->error_url = '{ODEME_OLMADI_URL}';
$payment->htmlForm->vip_name = '{VIP_NAME}';
$payment->htmlForm->report_email = '{REPORT_EMAIL}';
$payment->htmlForm->only_email = '{ONLY_EMAIL}';
$payment->htmlForm->post_url = '{POST_URL}';
```

```html


  
    openHtmlForm(); ?>

    <input type="text" name="oyuncu" placeholder="kullanıcı adı..."><br>
    <input type="text" name="amount" placeholder="kredi miktarı"><br>
    <input type="checkbox" name="odemeturu" value="kredikarti"> Kredi Kartı<br>
    <input type="submit" value="Gönder">

    <?php echo $payment->closeHtmlForm(); ?>
  </body>
</html>

Geri Dönen Post İşlemi, (*4)

  // {posturl} sayfası.

  try {
    /**
     * Gelen post bilgilerini $post değişkenine atadık. [trans_id, username, credit, secret]
     * handle() fonksiyonu, gelen postun eksik olup olmadığını ve güvenlik kodunun doğruluğunu kontrol edip geri dönüş yapıyor.
     * Eğer kontrolde bir sorun varsa catch() içine atıyor.
     */
    $post = $payment->handle();

    // Gelen $post değişkeninden aynı trans_id ile oyuncuya kredi yüklenmiş mi kontrol edebilir, yüklenmemiş ise kredisini yükleyebilirsiniz.
  } catch (PaymentException $e) {
    // Güvenlik kodu yanlış ya da gelen post eksik.
    echo $e->getMessage();
  }

The Versions

23/04 2017

dev-master

9999999-dev

  Sources   Download

MIT

by Davut Kember

23/04 2017

1.0.8

1.0.8.0

  Sources   Download

MIT

by Davut Kember

08/04 2017

1.0.7

1.0.7.0

  Sources   Download

MIT

by Davut Kember

08/04 2017

1.0.6

1.0.6.0

  Sources   Download

MIT

by Davut Kember

28/03 2017

1.0.5

1.0.5.0

  Sources   Download

MIT

by Davut Kember

05/03 2017

1.0.4

1.0.4.0

  Sources   Download

MIT

by Davut Kember

05/03 2017

1.0.3

1.0.3.0

  Sources   Download

MIT

by Davut Kember

02/03 2017

1.0.2

1.0.2.0

  Sources   Download

MIT

by Davut Kember

02/03 2017

1.0.1

1.0.1.0

  Sources   Download

MIT

by Davut Kember

02/03 2017

1.0

1.0.0.0

  Sources   Download

MIT

by Davut Kember