removePaymentMethod() 공개 메소드

public removePaymentMethod ( $paymentMethod )
 public function removePaymentMethod($paymentMethod)
 {
     parent::removePaymentMethod($paymentMethod);
     if (!$paymentMethod->relationLoaded('account_gateway_token')) {
         $paymentMethod->load('account_gateway_token');
     }
     $response = $this->gateway()->deleteCard(['customerReference' => $paymentMethod->account_gateway_token->token, 'cardReference' => $paymentMethod->source_reference])->send();
     if ($response->isSuccessful()) {
         return true;
     } else {
         throw new Exception($response->getMessage());
     }
 }
 public function removePaymentMethod($paymentMethod)
 {
     parent::removePaymentMethod($paymentMethod);
     $response = $this->gateway()->deletePaymentMethod(['token' => $paymentMethod->source_reference])->send();
     if ($response->isSuccessful()) {
         return true;
     } else {
         throw new Exception($response->getMessage());
     }
 }
 public function removePaymentMethod($paymentMethod)
 {
     parent::removePaymentMethod($paymentMethod);
     $wepay = Utils::setupWePay($this->accountGateway);
     $response = $wepay->request('/credit_card/delete', ['client_id' => WEPAY_CLIENT_ID, 'client_secret' => WEPAY_CLIENT_SECRET, 'credit_card_id' => intval($paymentMethod->source_reference)]);
     if ($response->state == 'deleted') {
         return true;
     } else {
         throw new Exception(trans('texts.failed_remove_payment_method'));
     }
 }