PayPal\Api\CreditCard::getId PHP Method

getId() public method

ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
Deprecation: Not publicly available
public getId ( ) : string
return string
    public function getId()
    {
        return $this->id;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Save a credit card with paypal
  * 
  * This helps you avoid the hassle of securely storing credit
  * card information on your site. PayPal provides a credit card
  * id that you can use for charging future payments.
  * 
  * @param array $params	credit card parameters
  */
 function saveCard($params)
 {
     $card = new CreditCard();
     $card->setType($params['type']);
     $card->setNumber($params['number']);
     $card->setExpireMonth($params['expire_month']);
     $card->setExpireYear($params['expire_year']);
     $card->setCvv2($params['cvv2']);
     $card->create(getApiContext());
     return $card->getId();
 }
All Usage Examples Of PayPal\Api\CreditCard::getId