Pass the user's locale along to PayPal. If it is supported, then the checkout screen on PayPal will be in the user's locale. Fixes bug #12119.
This commit is contained in:
parent
b21a6e331b
commit
3c0cf0f1a5
3 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
- fixed #12136: Unable to add more than one image in Story
|
- fixed #12136: Unable to add more than one image in Story
|
||||||
- fixed #12133: RenderThingData macro doesn't accept templateId
|
- fixed #12133: RenderThingData macro doesn't accept templateId
|
||||||
- fixed #12152: PayPal Standard ignores shop-credit
|
- fixed #12152: PayPal Standard ignores shop-credit
|
||||||
|
- fixed #12119: Locale setting for paypal
|
||||||
|
|
||||||
7.10.17
|
7.10.17
|
||||||
- fixed: Forced to use a PayDriver even with a balance of 0 in the cart.
|
- fixed: Forced to use a PayDriver even with a balance of 0 in the cart.
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,7 @@ 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'),
|
||||||
|
|
@ -198,6 +199,7 @@ 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);
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,7 @@ sub paymentVariables {
|
||||||
my $url = $self->session->url;
|
my $url = $self->session->url;
|
||||||
my $base = $url->getSiteURL . $url->page;
|
my $base = $url->getSiteURL . $url->page;
|
||||||
my $cart = $self->getCart;
|
my $cart = $self->getCart;
|
||||||
|
my $i18n = WebGUI::International->new($self->session);
|
||||||
|
|
||||||
my $return = URI->new($base);
|
my $return = URI->new($base);
|
||||||
$return->query_form( {
|
$return->query_form( {
|
||||||
|
|
@ -262,6 +263,7 @@ sub paymentVariables {
|
||||||
|
|
||||||
return => $return->as_string,
|
return => $return->as_string,
|
||||||
cancel_return => $cancel->as_string,
|
cancel_return => $cancel->as_string,
|
||||||
|
lc => $i18n->getLanguage->{locale},
|
||||||
|
|
||||||
handling_cart => $cart->calculateShipping, ##According to https://www.x.com/message/180018#180018
|
handling_cart => $cart->calculateShipping, ##According to https://www.x.com/message/180018#180018
|
||||||
tax_cart => $cart->calculateTaxes,
|
tax_cart => $cart->calculateTaxes,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue