Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ao committed May 27, 2015
1 parent c0ec8aa commit f70de55
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.6 2015-05-27
* Check is_numeric instead of is_int for Captures

### 1.5 2015-05-19
* Modify PHP library timeout period and message

Expand Down
2 changes: 1 addition & 1 deletion examples/3ds_redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?php

/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
2 changes: 1 addition & 1 deletion examples/cancel_authorised_order.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<?php
/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
2 changes: 1 addition & 1 deletion examples/capture_authorised_order.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<?php
/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
2 changes: 1 addition & 1 deletion examples/create_order.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<?php
/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
2 changes: 1 addition & 1 deletion examples/get_stored_cards.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<?php
/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
2 changes: 1 addition & 1 deletion examples/partial_refund_order.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<?php
/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
2 changes: 1 addition & 1 deletion examples/refund_order.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<?php
/**
* PHP library version: v1.5
* PHP library version: v1.6
*/
require_once('../lib/worldpay.php');

Expand Down
8 changes: 4 additions & 4 deletions lib/worldpay.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* PHP library version: v1.5
* PHP library version: v1.6
*/

final class Worldpay
Expand Down Expand Up @@ -176,7 +176,7 @@ private function sendRequest($action, $json = false, $expectResponse = false, $m
}

$clientUserAgent = 'os.name=' . php_uname('s') . ';os.version=' . php_uname('r') . ';os.arch=' .
$arch . ';lang.version='. phpversion() . ';lib.version=v1.5;' .
$arch . ';lang.version='. phpversion() . ';lib.version=v1.6;' .
'api.version=v1;lang=php;owner=worldpay';

curl_setopt(
Expand Down Expand Up @@ -342,7 +342,7 @@ public function captureAuthorisedOrder($orderCode = false, $amount = null)
self::onError('ip', self::$errors['capture']['ordercode']);
}

if (!empty($amount) && is_int($amount)) {
if (!empty($amount) && is_numeric($amount)) {
$json = json_encode(array('captureAmount'=>"{$amount}"));
} else {
$json = false;
Expand Down Expand Up @@ -375,7 +375,7 @@ public function refundOrder($orderCode = false, $amount = null)
self::onError('ip', self::$errors['refund']['ordercode']);
}

if (!empty($amount) && is_int($amount)) {
if (!empty($amount) && is_numeric($amount)) {
$json = json_encode(array('refundAmount'=>"{$amount}"));
} else {
$json = false;
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Worldpay PHP Library v1.5
# Worldpay PHP Library v1.6

#### Documentation
https://online.worldpay.com/docs
Expand Down

0 comments on commit f70de55

Please sign in to comment.