PayPal\Api\CreditCard::setCvv2 PHP Method

setCvv2() public method

3-4 digit card validation code.
public setCvv2 ( string $cvv2 )
$cvv2 string
    public function setCvv2($cvv2)
    {
        $this->cvv2 = $cvv2;
        return $this;
    }

Usage Example

示例#1
0
文件: Paypal.php 项目: shivap87/cost
 /**
  * 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::setCvv2