X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Facct_google.pm;h=afc45db81b64f05ecc2467ceaecc5e2cf2bc75db;hb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;hp=c64d293a9eb5d5daad1deadbff4be4ad162e809f;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git 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 {