-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
206 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/SecucardConnect/Product/Payment/Event/PaymentChanged.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace SecucardConnect\Product\Payment\Event; | ||
|
||
use SecucardConnect\Client\ClientError; | ||
use SecucardConnect\Event\DefaultEventHandler; | ||
|
||
/** | ||
* Internal class to handle a creditcard change event. | ||
* @package SecucardConnect\Product\Payment | ||
*/ | ||
class PaymentChanged extends DefaultEventHandler | ||
{ | ||
/** | ||
* @param $event | ||
* | ||
* @throws ClientError If the payment transaction id is missing in the event data | ||
*/ | ||
function onEvent($event) | ||
{ | ||
if (!isset($event->data[0]['id'])) { | ||
throw new ClientError('Invalid event data, payment id not found.'); | ||
} | ||
|
||
call_user_func($this->callback, $this->service->get($event->data[0]['id'])); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/SecucardConnect/Product/Payment/Model/SecupayCreditcard.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Payment Secupaycreditcards Api Model class | ||
*/ | ||
|
||
namespace SecucardConnect\Product\Payment\Model; | ||
|
||
/** | ||
* Payment Secupaycreditcards Api Model class | ||
* | ||
*/ | ||
class SecupayCreditcard extends Transaction | ||
{ | ||
/** | ||
* @var \SecucardConnect\Product\Payment\Model\Customer | ||
*/ | ||
public $customer; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $url_success; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $url_failure; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $iframe_url; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/SecucardConnect/Product/Payment/SecupayCreditcardsService.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace SecucardConnect\Product\Payment; | ||
|
||
use SecucardConnect\Product\Payment\Service\PaymentService; | ||
|
||
/** | ||
* Operations for the payment.secupaycreditcard resource. | ||
* @package SecucardConnect\Product\Payment | ||
*/ | ||
class SecupayCreditcardsService extends PaymentService | ||
{ | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.