Adding the CDG Commerce payment plugin.
This commit is contained in:
parent
4d5841418d
commit
990cd43035
5 changed files with 801 additions and 2 deletions
|
|
@ -42,7 +42,8 @@ sub cancelTransaction {
|
|||
|
||||
$plugin = WebGUI::Commerce::Payment->load($self->gateway);
|
||||
$plugin->cancelRecurringPayment({
|
||||
id => $self->gatewayId
|
||||
id => $self->gatewayId,
|
||||
transaction => $self,
|
||||
});
|
||||
return $plugin->resultMessage.' (code: '.$plugin->errorCode.')' if ($plugin->errorCode);
|
||||
|
||||
|
|
@ -112,6 +113,20 @@ sub get {
|
|||
return $self->{_properties};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getByGatewayId {
|
||||
my ($self, $gatewayId, $paymentGateway, $transactionId);
|
||||
$self = shift;
|
||||
$gatewayId = shift;
|
||||
$paymentGateway = shift;
|
||||
|
||||
($transactionId) = WebGUI::SQL->quickArray("select transaction Id from transaction where gatewayId=".quote($gatewayId).
|
||||
" and gateway=".quote($paymentGateway));
|
||||
|
||||
return WebGUI::Commerce::Transaction->new($transactionId) if $transactionId;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getItems {
|
||||
my ($self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue