import * as TelegramBot from 'node-telegram-bot-api';
import * as fs from 'fs';
const TOKEN = '<your_token_got_from_gotfather>';
const GROUP_ID = '<your_group_id>';
const FILE = './data.xlsx';
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="POST" action="https://test.paycom.uz"> | |
<input type="hidden" name="merchant" value="5aec04053f3861ae47378173"/> | |
<input type="hidden" name="amount" value="100"/> <!-- Amount in coins --> | |
<input type="hidden" name="account[Ebook]" value="1"/> | |
<input type="hidden" name="lang" value="en"/> | |
<button type="submit">Checkout</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MerchantAPI { | |
public function CancelTransaction($id, $reason) | |
{ | |
if (is_array($this->Authorize())) { | |
return $this->Authorize(); | |
} | |
foreach ($this->errors as $k => $v) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
// todo: Check, is there any other transaction for this order/service | |
$transaction = new Transaction(); | |
$found = $transaction->find(['account' => $this->request->params['account']]); | |
if ($found) { | |
if (($found->state == Transaction::STATE_CREATED || $found->state == Transaction::STATE_COMPLETED) | |
&& $found->paycom_transaction_id !== $this->request->params['id']) { | |
$this->response->error( | |
PaycomException::ERROR_COULD_NOT_PERFORM, |
NewerOlder