Skip to content

Commit 706431c

Browse files
committed
Use Yii methods in example controller
1 parent 5df4fdb commit 706431c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

docs/get-it-started.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,13 @@ class PaypalController extends CController
127127

128128
$payment->execute($status = new \Payum\Core\Request\BinaryMaskStatusRequest($token));
129129

130-
$content = '';
131-
if ($status->isSuccess()) {
132-
$content .= '<h3>Payment status is success.</h3>';
133-
} else {
134-
$content .= '<h3>Payment status IS NOT success.</h3>';
135-
}
136-
137-
$content .= '<br /><br />'.json_encode(iterator_to_array($status->getModel()), JSON_PRETTY_PRINT);
138-
139-
echo '<pre>',$content,'</pre>';
140-
exit;
130+
echo Yii::t('app',
131+
'0#<h3>Payment status is NOT success.</h3>|'.
132+
'1#<h3>Payment status IS success.</h3>',
133+
$status->isSuccess()
134+
);
135+
echo CHtml::tag('pre', array(), CVarDumper::dumpAsString($status->getModel(), 10, true));
136+
Yii::app()->end();
141137
}
142138

143139
/**

0 commit comments

Comments
 (0)