小编Sun*_*kar的帖子

Paypal REST API不会在Paypal Sandbox或实时网站上显示付款金额

休息api工作正常,但它没有显示数量按顺序"按顺序总和数量没有显示,但说明显示?" "我使用下面的代码来传递金额和描述"

require DIR . '/../bootstrap.php';
use PayPal\Api\Address;
use PayPal\Api\Amount;
use PayPal\Api\Payer;
use PayPal\Api\Payment;
use PayPal\Api\FundingInstrument;
use PayPal\Api\RedirectUrls;
use PayPal\Api\Transaction;


$charge = trim($_POST['amount']);
$currency = trim($_POST['currency']);
$desc = trim($_POST['desc']);
$get_url=trim($_SESSION['get_url']);


$payer = new Payer();
$payer->setPayment_method("paypal");

$amount = new Amount();
$amount->setCurrency($currency);
$amount->setTotal($charge);

$transaction = new Transaction();
$transaction->setAmount($amount);
$transaction->setDescription($desc);





}

"In order summery its showing description but amount is not showing."
Please help me to sort out this problem"
Thank for you help.

Sunil
Run Code Online (Sandbox Code Playgroud)

php paypal paypal-sandbox paypal-rest-sdk

1
推荐指数
1
解决办法
1653
查看次数

标签 统计

paypal ×1

paypal-rest-sdk ×1

paypal-sandbox ×1

php ×1