Skip to content

Commit 00a1b5a

Browse files
committed
[SLWP] No pound symbol in submitted data.
1 parent 286b972 commit 00a1b5a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

perllib/Open311/Endpoint/Role/SLWP.pm

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ chosen for garden/bulky.
1212

1313
package Open311::Endpoint::Role::SLWP;
1414

15+
use utf8;
1516
use Moo::Role;
1617

1718
around check_for_data_value => sub {
@@ -53,6 +54,7 @@ around post_service_request_update => sub {
5354

5455
if ($args->{description} =~ /Payment confirmed, reference (.*), amount (.*)/) {
5556
my ($ref, $amount) = ($1, $2);
57+
$amount =~ s/£//;
5658
my $integ = $class->get_integration;
5759
my $event = $integ->GetEvent($args->{service_request_id});
5860
# Could GetEventType and loop through it all to find these IDs out but for just this seemed okay

t/open311/endpoint/kingston.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $soap_lite->mock(call => sub {
7474
is $ref[1]->value, 'ABC';
7575
@ref = ${$child[1]->value}->value;
7676
is $ref[0]->value, 27411;
77-
is $ref[1]->value, '£34.56';
77+
is $ref[1]->value, '34.56';
7878
} else {
7979
is @params, 'UNKNOWN';
8080
}

0 commit comments

Comments
 (0)