コード例 #1
0
ファイル: UpdatePay.php プロジェクト: asaokamei/payjp
 /**
  * @param PayJpApi $api
  * @param string   $charge_id
  * @param Charge   $charge
  */
 public function __construct($api, $charge_id = null, $charge = null)
 {
     parent::__construct($api);
     if (!is_null($charge_id)) {
         $this->charge_id = $charge_id;
         $this->retrieve();
     } elseif (!empty($charge)) {
         $this->charge = $charge;
         $this->charge_id = $charge['id'];
     } else {
         throw new InvalidArgumentException();
     }
 }
コード例 #2
0
ファイル: CreatePay.php プロジェクト: asaokamei/payjp
 /**
  * @param PayJpApi $api
  * @param string   $charge_id
  */
 public function __construct($api, $charge_id)
 {
     parent::__construct($api);
     $this->token_id = $charge_id;
 }