PHP code example of mikefinch / yii2-yandex-kassa-api
1. Go to this page and download the library: Download mikefinch/yii2-yandex-kassa-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mikefinch / yii2-yandex-kassa-api example snippets
class Orders extends Model implements OrderInterface {
...
public function setInvoiceId($invoiceId) {
$this->invoice_id = $invoiceId;
}
public function getInvoiceId() {
return $this->invoice_id;
}
public function getPaymentAmount() {
return $this->amount;
}
public function findByInvoiceId($invoiceId) {
return self::find()->where(['invoice_id' => $invoiceId]);
}
public function findById($id) {
return self::findOne($id);
}
}