<commit_before><?php

require __DIR__ . "/../autoload.php";

use PayMaya\API\Payments;
use PayMaya\Model\Payment\Card;
use PayMaya\Model\Payment\Amount;
use PayMaya\Model\Payment\Buyer;

$card = new Card();
$card->number = '5123456789012346';
$card->cvc = '111';
$card->expM = '05';
$card->expY = '2017';

$payment = new Payments('pk-N6TvoB4GP2kIgNz4OCchCTKYvY5kPQd2HDRSg8rPeQG', 'sk-9lRmFTV8BIdxoXWm5liDAlKF0yL4gZzwmDQAmnvxWOF');
try {
    $payment->createToken($card);
} catch(\Exception $e) {
    die($e->getMessage());
}

$amount = new Amount();
$amount->total = 100;
//$amount->code = 'PHP'; // [ optional ] default value is PHP

$buyer = new Buyer();
$buyer->firstname = 'John';
$buyer->middlename = 'D.';
$buyer->lastname = 'Doe';
$buyer->phone = '639102626010';
$buyer->email = '<EMAIL>';
$buyer->address1 = '123 East Village';
//$buyer->address2 = '124 East Village'; // [ optional ]

$buyer->city = 'Makati City';
$buyer->state = 'Metro Manila';
$buyer->zip = '1216';
//$buyer->country = 'PHP' // [ optional ] default value is PHP

try {
    $pay = $payment->pay($buyer, $amount);
    print_r(json_decode($pay, true));
} catch(\Exception $e) {<commit_msg>remove credentials<commit_after><?php

require __DIR__ . "/../autoload.php";

use PayMaya\API\Payments;
use PayMaya\Model\Payment\Card;
use PayMaya\Model\Payment\Amount;
use PayMaya\Model\Payment\Buyer;

$key = '[KEY]';
$secret = '[SECRET]';
$card = new Card();
$card->number = '5123456789012346';
$card->cvc = '111';
$card->expM = '05';
$card->expY = '2017';

$payment = new Payments($key, $secret);
try {
    $payment->createToken($card);
} catch(\Exception $e) {
    die($e->getMessage());
}

$amount = new Amount();
$amount->total = 100;
//$amount->code = 'PHP'; // [ optional ] default value is PHP

$buyer = new Buyer();
$buyer->firstname = 'John';
$buyer->middlename = 'D.';
$buyer->lastname = 'Doe';
$buyer->phone = '639102626010';
$buyer->email = '<EMAIL>';
$buyer->address1 = '123 East Village';
//$buyer->address2 = '124 East Village'; // [ optional ]

$buyer->city = 'Makati City';
$buyer->state = 'Metro Manila';
$buyer->zip = '1216';
//$buyer->country = 'PHP' // [ optional ] default value is PHP

try {
    $pay = $payment->pay($buyer, $amount);
    print_r(json_decode($pay, true));
} catch(\Exception $e) {
{'fraction_non_alphanumeric': 0.21503496503496503, 'fraction_numerical': 0.050699300699300696, 'mean_word_length': 4.502403846153846, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2105155', 'n_tokens_mistral': 1002, 'n_tokens_neox': 905, 'n_words': 183}