我正在使用PayPal rest-api-sdk-php最新版本.在创建付款和执行付款以及获取所有相关数据方面,一切都运行良好,但已决定我希望通过paypal支付的总金额.它返回一个JSON对象,例如下面的例子
"transactions": [
{
"amount": {
"total": "20.00",
"currency": "GBP",
"details": {
"subtotal": "17.50",
"tax": "1.30",
"shipping": "1.20"
}
},
"description": "Payment description",
"invoice_number": "55e30dbd55cea",
"item_list": {
"items": [
{
"name": "Ground Coffee 40 oz",
"price": "7.50",
"currency": "GBP",
"quantity": "1",
"description": "Ground Coffee 40 oz",
"tax": "0.30"
},
{
"name": "Granola bars",
"price": "2.00",
"currency": "USD",
"quantity": "5",
"description": "Granola Bars with Peanuts",
"tax": "0.20"
}
]
},
}
],
Run Code Online (Sandbox Code Playgroud)
我试过调用$ payment-> transactions-> amount-> total但是得到了一个错误.只是想知道是否有人可以解决问题.谢谢
我有一个像这样的html页面设置
<div class="row row-venue">
<div class="col-sm-12">
<h3>Venue 1</h3>
</div>
</div>
<div class="row row-venue">
<div class="col-sm-12">
<h3>Venue 2</h3>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我想要做的就是让每个奇数的h3与每个偶数颜色不同.我试过下面的代码
div.row-venue div.col-venue h3:nth-of-type(odd){
color:white;
}
div.row-venue div.col-venue h3:nth-of-type(even){
color:black;
}
Run Code Online (Sandbox Code Playgroud)
甚至只是尝试过
h3:nth-of-type(odd){
color:white;
}
h3:nth-of-type(even){
color:black;
}
Run Code Online (Sandbox Code Playgroud)
我似乎无法理解它,任何帮助将不胜感激