我正在Web上安装MercadoPago Api,当我尝试保存客户然后再获得Card卡时,出现错误。
<?php
require "vendor/autoload.php";
MercadoPago\SDK::setAccessToken("TEST-2458547510872121-040809-dbcc227b21a86acbe702457070a98ff3-126959980");
$customer = new MercadoPago\Customer();
$customer->email = "test@test.com";
$customer->save();
$card = new MercadoPago\Card();
$card->token = "9b2d63e00d66a8c721607214cedaecda";
$card->customer_id = $customer->id();
$card->save();
?>
当我运行脚本时,我得到以下信息: 致命错误:未捕获错误:调用C:\ xampp \ htdocs \ mpago.php:11中未定义的方法MercadoPago \ Customer :: id()堆栈跟踪:#0 {main}抛出于C:\ xampp \ htdocs \ mpago。第11行的php 欢迎任何帮助。 谢谢大家!