Set the locale in the correct communication with PayPal.
This commit is contained in:
parent
3c0cf0f1a5
commit
e2a218e6f5
1 changed files with 2 additions and 2 deletions
|
|
@ -191,7 +191,6 @@ PayPal API spit back.
|
||||||
sub processPayment {
|
sub processPayment {
|
||||||
my ( $self, $transaction ) = @_;
|
my ( $self, $transaction ) = @_;
|
||||||
|
|
||||||
my $i18n = WebGUI::International->new($self->session);
|
|
||||||
my $form = $self->payPalForm(
|
my $form = $self->payPalForm(
|
||||||
METHOD => 'DoExpressCheckoutPayment',
|
METHOD => 'DoExpressCheckoutPayment',
|
||||||
PAYERID => $self->session->form->process('PayerId'),
|
PAYERID => $self->session->form->process('PayerId'),
|
||||||
|
|
@ -199,7 +198,6 @@ sub processPayment {
|
||||||
AMT => $self->getCart->calculateTotal,
|
AMT => $self->getCart->calculateTotal,
|
||||||
CURRENCYCODE => $self->get('currency'),
|
CURRENCYCODE => $self->get('currency'),
|
||||||
PAYMENTACTION => 'SALE',
|
PAYMENTACTION => 'SALE',
|
||||||
LOCALECODE => $i18n->getLanguage->{locale},
|
|
||||||
);
|
);
|
||||||
my $response = LWP::UserAgent->new->post( $self->apiUrl, $form );
|
my $response = LWP::UserAgent->new->post( $self->apiUrl, $form );
|
||||||
my $params = $self->responseHash($response);
|
my $params = $self->responseHash($response);
|
||||||
|
|
@ -272,12 +270,14 @@ sub www_sendToPayPal {
|
||||||
my $url = $session->url;
|
my $url = $session->url;
|
||||||
my $base = $url->getSiteURL . $url->page;
|
my $base = $url->getSiteURL . $url->page;
|
||||||
|
|
||||||
|
my $i18n = WebGUI::International->new($self->session);
|
||||||
my $returnUrl = URI->new($base);
|
my $returnUrl = URI->new($base);
|
||||||
$returnUrl->query_form( {
|
$returnUrl->query_form( {
|
||||||
shop => 'pay',
|
shop => 'pay',
|
||||||
method => 'do',
|
method => 'do',
|
||||||
do => 'payPalCallback',
|
do => 'payPalCallback',
|
||||||
paymentGatewayId => $self->getId,
|
paymentGatewayId => $self->getId,
|
||||||
|
LOCALECODE => $i18n->getLanguage->{locale},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue