[ create a new paste ] login | about

Link: http://codepad.org/BmAT3bMY    [ raw code | output | fork ]

PHP, pasted on Mar 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$request = new Pin\Charge\Create(array(
    'amount'      => 4000,
    'description' => 'testing the charges',
    'email'       => $email,
    'ip_address'  => $ip,
    'card_token'  => $card,
	'currency'    => 'USD'
));

// send it
if($response = $service->submit($request)) {
$responseData = json_decode($response, true);
if($responseData['response']['success'] == true){
echo "<u>Payment had success</u>";
}
else {
echo "<u>Payment was declined</u>";
}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$request = new Pin\Charge\Create(array(
    'amount'      => 4000,
    'description' => 'testing the charges',
    'email'       => $email,
    'ip_address'  => $ip,
    'card_token'  => $card,
	'currency'    => 'USD'
));

// send it
if($response = $service->submit($request)) {
$responseData = json_decode($response, true);
if($responseData['response']['success'] == true){
echo "<u>Payment had success</u>";
}
else {
echo "<u>Payment was declined</u>";
}


Create a new paste based on this one


Comments: