Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

fixes #332 #333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/Resource/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ public function setBoleto($expirationDate, $logoUri, array $instructionLines = [
/**
* Set credit card holder.
*
* @param \Moip\Resource\Customer $holder
* @param \Moip\Resource\Customer|\Moip\Resource\Holder $holder
*/
private function setCreditCardHolder(Holder $holder)
private function setCreditCardHolder($holder)
{
$birthdate = $holder->getBirthDate();
if ($birthdate instanceof \DateTime) {
Expand All @@ -469,13 +469,13 @@ private function setCreditCardHolder(Holder $holder)
/**
* Set credit cardHash.
*
* @param string $hash Credit card hash encripted using Moip.js
* @param \Moip\Resource\Customer $holder
* @param bool $store Flag to know if credit card should be saved.
* @param string $hash Credit card hash encripted using Moip.js
* @param \Moip\Resource\Customer|\Moip\Resource\Holder $holder
* @param bool $store Flag to know if credit card should be saved.
*
* @return $this
*/
public function setCreditCardHash($hash, Holder $holder, $store = true)
public function setCreditCardHash($hash, $holder, $store = true)
{
$this->data->fundingInstrument->method = self::METHOD_CREDIT_CARD;
$this->data->fundingInstrument->creditCard = new stdClass();
Expand All @@ -491,16 +491,16 @@ public function setCreditCardHash($hash, Holder $holder, $store = true)
* Credit card used in a payment.
* The card when returned within a parent resource is presented in its minimum representation.
*
* @param int $expirationMonth Card expiration month
* @param int $expirationYear Year of card expiration.
* @param string $number Card number.
* @param int $cvc Card Security Code.
* @param \Moip\Resource\Customer $holder
* @param bool $store Flag to know if credit card should be saved.
* @param int $expirationMonth Card expiration month
* @param int $expirationYear Year of card expiration.
* @param string $number Card number.
* @param int $cvc Card Security Code.
* @param \Moip\Resource\Customer|\Moip\Resource\Holder $holder
* @param bool $store Flag to know if credit card should be saved.
*
* @return $this
*/
public function setCreditCard($expirationMonth, $expirationYear, $number, $cvc, Holder $holder, $store = true)
public function setCreditCard($expirationMonth, $expirationYear, $number, $cvc, $holder, $store = true)
{
$this->data->fundingInstrument->method = self::METHOD_CREDIT_CARD;
$this->data->fundingInstrument->creditCard = new stdClass();
Expand Down