本文整理汇总了PHP中Checkout::build方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::build方法的具体用法?PHP Checkout::build怎么用?PHP Checkout::build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::build方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testBuildWithoutTotal
public function testBuildWithoutTotal()
{
$checkout = new Checkout();
$checkout->addItem(CheckoutItem::of(1, 'SKU')->setExternalId('external_id')->setName(['en' => 'Name'])->setPrice(['EUR' => '10.0']));
try {
$checkout->build();
$this->fail();
} catch (\LogicException $ignored) {
}
}
示例2: Checkout
<?php
#A form for filling out delivery information such as the delivery address.
#All fields have to be filled in to progress.
include 'model/checkout_model.php';
$p = new Checkout();
$data = $p->build();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="container_brown">
<h3 class="font_green"> Delivery information </h3>
<form class="font_green" method="post" action="checkout.php">
<table>
<tr>
<td>
First name: <input type="text" name="first_name" value="<?php
echo $data['first_name'];
?>
" maxlength="255">
<b class="required">*</b>
</td>
</tr>
<tr>
<td>
Last name: <input type="text" name="last_name" value="<?php
echo $data['last_name'];