Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative Payment Methods (APMs) #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
640 changes: 640 additions & 0 deletions src/main/php/com-realexpayments-remote-sdk/domain/apm/APMRequest.php

Large diffs are not rendered by default.

494 changes: 494 additions & 0 deletions src/main/php/com-realexpayments-remote-sdk/domain/apm/APMResponse.php

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions src/main/php/com-realexpayments-remote-sdk/domain/apm/APMType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php


namespace com\realexpayments\remote\sdk\domain\APM;


use com\realexpayments\remote\sdk\EnumBase;

/**
* Class ThreeDSecureType
* Enumeration for the ThreeDSecure type.
*
* @package com\realexpayments\remote\sdk\domain\threeDSecure
*/
class APMType extends EnumBase{

const __default = self::PAYMENT_SET;

const PAYMENT_SET = "payment-set";

const PAYMENT_CREDIT = "payment-credit";

/**
* @var string The ThreeDSecure type String value
*/
private $type;

/**
* ThreeDSecureType constructor
*
* @param string $type
*/
public function __construct( $type ) {
parent::__construct( $type );

$this->type = $type;
}

/**
* Get the string value of the ThreeDSecure type
*
* @return string
*/
public function getType() {
return $this->type;
}

}
100 changes: 100 additions & 0 deletions src/main/php/com-realexpayments-remote-sdk/domain/apm/BankAccount.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php


namespace com\realexpayments\remote\sdk\domain\APM;


/**
* Class BankAccount
* @package com\realexpayments\remote\sdk\domain\APM
*
* <p>
* Domain object representing PaymentMethodDetails information to be passed to Realex Alternative Payment Method
* for payment-set transactions.
* Payment data contains the CVN number for the stored card
* </p>
* <p/>
* <p><code><pre>
* $bankAccount = ( new BankAccount() )
* ->addIban("DE84837473949793743749")
* ->addBic("GENODEF1GW1");
* </pre></code></p>
*
* @author gnurub
*/
class BankAccount
{

/**
* @var string $iban The endpoint to which the customer should be redirected after a payment has been attempted or successfully completed on the payment scheme's site.
*/
private $iban;
private $bic;

/**
* BankAccount constructor.
*/
public function __construct()
{
}

/**
* @return string
*/
public function getIban()
{
return $this->iban;
}

/**
* @param string $iban
*/
public function setIban($iban)
{
$this->iban = $iban;
}

/**
* @param string $iban
* @return BankAccount
*/
public function addIban($iban)
{
$this->iban = $iban;

return $this;
}

/**
* @return string
*/
public function getBic()
{
return $this->bic;
}

/**
* @param string $bic
*/
public function setBic($bic)
{
$this->bic = $bic;
}

/**
* @param string $bic
* @return BankAccount
*/
public function addBic($bic)
{
$this->bic = $bic;

return $this;
}

public static function GetClassName()
{
return __CLASS__;
}

}
Loading