projects
/
Vend-Payment-BusinessOnlinePayment.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check for order_number method before using it
[Vend-Payment-BusinessOnlinePayment.git]
/
BusinessOnlinePayment.pm
diff --git
a/BusinessOnlinePayment.pm
b/BusinessOnlinePayment.pm
index
c9f8b3e
..
5c1a167
100644
(file)
--- a/
BusinessOnlinePayment.pm
+++ b/
BusinessOnlinePayment.pm
@@
-146,8
+146,6
@@
under the same terms as Perl itself.
=cut
=cut
-=cut
-
package Vend::Payment;
use strict;
use vars qw( $VERSION );
package Vend::Payment;
use strict;
use vars qw( $VERSION );
@@
-285,7
+283,9
@@
sub onlinepayment {
if ( $transaction->is_success() ) {
$result{MStatus} = 'success';
if ( $transaction->is_success() ) {
$result{MStatus} = 'success';
- $result{'order-id'} = $transaction->order_number || $opt->{'order_id'};
+ $result{'order-id'} =
+ ( $transaction->can('order_number') && $transaction->order_number )
+ || $opt->{'order_id'};
} else {
} else {