2015-10-12 47 views

回答

3

以下是演示如何從成功的付款方式創建中檢索令牌的代碼片段。

$result = Braintree_PaymentMethod::create(array(
    'customerId' => 'existing-customer', 
    'paymentMethodNonce' => 'valid-nonce' 
)); 

$token = $result->paymentMethod->token; 

More information about result objects