Skip to content

Commit

Permalink
Merge pull request #53 from subscribepro/250-add-payment-token-field
Browse files Browse the repository at this point in the history
#250 Use payment token from transaction response instead of from wallet entry / pay profile
  • Loading branch information
garthbrantley authored Dec 6, 2023
2 parents f1b25c3 + 7ad3734 commit d3746c0
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/SubscribePro/Service/Transaction/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,42 @@ public function getRefToken()
return $this->getData(self::REF_TOKEN);
}

/**
* @return string|null
*/
public function getPaymentToken()
{
return $this->getData(self::PAYMENT_TOKEN);
}

/**
* @param string $paymentToken
*
* @return $this
*/
public function setPaymentToken($paymentToken)
{
return $this->setData(self::PAYMENT_TOKEN, $paymentToken);
}

/**
* @return string|null
*/
public function getThirdPartyPaymentToken()
{
return $this->getData(self::THIRD_PARTY_PAYMENT_TOKEN);
}

/**
* @param string $paymentToken
*
* @return $this
*/
public function setThirdPartyPaymentToken($paymentToken)
{
return $this->setData(self::THIRD_PARTY_PAYMENT_TOKEN, $paymentToken);
}

/**
* @return string|null
*/
Expand Down
26 changes: 26 additions & 0 deletions src/SubscribePro/Service/Transaction/TransactionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ interface TransactionInterface extends DataInterface
public const REF_TRANSACTION_ID = 'ref_transaction_id';
public const REF_GATEWAY_ID = 'ref_gateway_id';
public const REF_TOKEN = 'ref_token';
public const PAYMENT_TOKEN = 'payment_token';
public const THIRD_PARTY_PAYMENT_TOKEN = 'third_party_payment_token';
public const TOKEN = 'token';
public const TYPE = 'type';
public const AMOUNT = 'amount';
Expand Down Expand Up @@ -273,6 +275,30 @@ public function getRefGatewayId();
*/
public function getRefToken();

/**
* @return string|null
*/
public function getPaymentToken();

/**
* @param string $paymentToken
*
* @return $this
*/
public function setPaymentToken($paymentToken);

/**
* @return string|null
*/
public function getThirdPartyPaymentToken();

/**
* @param string $paymentToken
*
* @return $this
*/
public function setThirdPartyPaymentToken($paymentToken);

/**
* @return string|null
*/
Expand Down

0 comments on commit d3746c0

Please sign in to comment.