summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/acct_google.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/FS/FS/part_export/acct_google.pm b/FS/FS/part_export/acct_google.pm
index c64d293a9..afc45db81 100644
--- a/FS/FS/part_export/acct_google.pm
+++ b/FS/FS/part_export/acct_google.pm
@@ -89,15 +89,18 @@ sub _export_unsuspend {
);
}
-sub captcha_url {
+sub auth_error {
my $self = shift;
my $google = $self->google_handle;
- if (exists ($google->{'captcha_url'}) ) {
- return 'http://www.google.com/accounts/'.$google->{'captcha_url'};
- }
- else {
- return '';
+ if ( $google->{'error'} ) {
+ my $url = $google->{'captcha_url'} || '';
+ $url = "http://www.google.com/accounts/$url" if $url;
+ return { 'captcha_url' => $url,
+ 'message' =>
+ 'Unable to connect to the Google API: '.$google->{'error'}.'.',
+ };
}
+ return; #nothing on success
}
sub captcha_auth {