我正在使用PayPal RESTful API. https://developer.paypal.com/webapps/developer/docs/api/
如何将我的消费者订单商品和购买说明传递给PayPal,因此当我的用户被重定向到PayPal以通过登录批准订单时,他们的订单摘要将显示在左侧..
.
关于左翼的订购概要
我试图传递transactions.item_list.items,但该信息仍未显示在订单摘要中.
有关如何使用PayPal RESTful API获取订单摘要以显示在paypal审批页面上的任何帮助?
我对他们的文档并不满意,因为它缺少一些信息,还有一些错误,这些错误浪费了我相当多的时间进行调试.
//
// prepare paypal data
$payment = array(
'intent' => 'sale',
'redirect_urls' => array(
'return_url' => $url_success,
'cancel_url' => $url_cancel,
),
'payer' => array(
'payment_method' => 'paypal'
)
);
//
// prepare basic payment details
$payment['transactions'][0] = array(
'amount' => array(
'total' => '0.03',
'currency' => 'USD',
'details' => array(
'subtotal' => '0.02',
'tax' => '0.00',
'shipping' => '0.01'
)
),
'description' => 'This is the payment transaction …
Run Code Online (Sandbox Code Playgroud) 我的问题 我的客户正在上传图片以穿上T恤.我需要知道设计中有多少主要颜色.我已经尝试过PHP脚本和Imagemagick,我似乎无法得到我想要的结果.
此图像有5种主要颜色变化.当我使用imagemagick的-unique-colors时,我得到了大量不同的颜色.是否有一行代码或脚本可用于获得5的结果.
这是我用来尝试使用imagemagick获得独特颜色计数的代码,但我得到了很多颜色.
exec(convert $origimage -unique-colors -scale 1000% $newimage);
Run Code Online (Sandbox Code Playgroud)