Skip to content

Commit

Permalink
Blik one click fixes
Browse files Browse the repository at this point in the history
Fixed register checkbox
Updated composer version
Changed sample seller data
  • Loading branch information
piotrjozwiak committed Apr 4, 2017
1 parent 8ac7f2f commit 6d96706
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "library",
"license": "LGPL-3.0",
"description": "tpay.com library",
"version": "1.0.2",
"version": "1.0.3",
"extra": [
{
"engine": "PHP SDK"
Expand Down
9 changes: 7 additions & 2 deletions src/common/_js/blikHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ function showT6() {
document.getElementById("alias").style.visibility = "hidden";
}
function checkRegister() {
register = document.getElementById("register").value;
var checkbox = document.getElementById("register");
if (checkbox.checked = true) {
checkbox.value = 1;
} else {
checkbox.value = 0;
}
register = checkbox.value;
}
function showAliases() {
var x = document.getElementById("blikSwitch");
Expand Down Expand Up @@ -51,7 +57,6 @@ function blikHandler() {
} else if (attempt === 1) {
var e = document.getElementById("blikSwitch");
var key = e.options[e.selectedIndex].value;
alert(key);
ajax('aliasKey=' + key + '&title=' + title);
setTimeout(function () {
checkResponse();
Expand Down
8 changes: 4 additions & 4 deletions tests/initBlik.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct()

$this->tpayApi = new \tpay\TransactionAPI (
'158ae0714578f5ab76bf6c0374cb1508b98ece5d',
'nvidia8800',
'testtpay123',
25223,
'testtpay'
);
Expand Down Expand Up @@ -61,10 +61,10 @@ public function create()
$config = array(
'opis' => 'transakcja testowa api',
'kwota' => 1.00,
'crc' => 'piotr',
'crc' => 'test',
'kanal' => 64,
'nazwisko' => 'kowalski',
'email' => 'piotr123.jozwiak@tpay.com',
'email' => 'test@tpay.com',
'akceptuje_regulamin' => 1,
);
$params['title'] = $this->tpayApi->create($config)['title'];
Expand Down Expand Up @@ -111,4 +111,4 @@ private function getAlias()

}

new OneClick();
new OneClick();

0 comments on commit 6d96706

Please sign in to comment.