-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboostrap.php
More file actions
executable file
·38 lines (30 loc) · 934 Bytes
/
Copy pathboostrap.php
File metadata and controls
executable file
·38 lines (30 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Omnipay\Omnipay;
$gateway = Omnipay::create('Adyen');
if(empty($_GET['authResult'])){
$response = $gateway->purchase(array
(
'amount' => '10.00',
'currency' => 'EUR',
'merchantReference' => 'TEST-10000',
'shipBeforeDate' => date('Y-m-d', time()),
'skinCode' => '05cp1ZtM',
'sessionValidity' => date(DATE_ATOM,mktime(date("i"), date("s"), date("m"), date("j"), date("Y")+1)),
'merchantAccount' => 'BidZoneNL',
'secret' => 'test',
'shopperLocale' => 'en_GB'
)
)->send();
if ($response->isRedirect()) {
$response->redirect();
exit;
} else {
echo $response->getMessage();
}
}else{
$response = $gateway->completePurchase()->send();
var_dump($response->isSuccessful());
var_dump($response->getResponse());
}
?>