Code for one product payment

#wixcode #corvid #payment #multilingue

I created a payment flow with code, it works well.
But there are 2 problems:

  • the payment window is displayed in English despite my French site.
    -The visitor can not choose to pay in cash but only by credit card.

What I am trying to do is:

-Add a place where the visitor can add a personal message during the payment process.
-Let the visitor choose to pay in cash if he wishes.
In my settings, I add manual payment and payment CB (stripe) and the currency is well set to €, but during the process of payment there is only possibility to pay in CB.
-Change the language of the payment window.

My site is well tuned in French but as you can see in the screenshot, some info is written in English and others are translated into French.

Thank’s you for help



I have read all the related documentation but I can not find a concrete solution.

https://support.wix.com/en/article/accepting-payments-on-your-wix-site-7014346
https://support.wix.com/en/article/setting-your-currency-for-accepting-payments
https://www.wix.com/corvid/reference/wix-pay.html
https://www.wix.com/corvid/reference/wix-pay-backend.html#createPayment
https://www.wix.com/corvid/reference/wix-pay-backend.html
https://www.wix.com/corvid/reference/wix-window.multilingual.html


Code page


import wixPay from 'wix-pay';
import { createPaymentForProduct } from 'backend/BE_Collection';
import { session } from 'wix-storage';

export function repeater1_itemReady($w, itemData, index) {

 let itemId = itemData._id;

    $w('#button1').onClick(async () => {

 let payment = await createPaymentForProduct(itemId, );

 await wixPay.startPayment((payment.id), { "termsAndConditionsLink": "https://" });

    });
} 

Code Backend

import wixPay from 'wix-pay-backend';
import wixData from 'wix-data';

export async function createPaymentForProduct(productId) {
 let product = await wixData.get('Stores/Products', productId);
 return wixPay.createPayment({

        amount: product.price,
        items: [
            { name: product.name, price: product.price }
        ]
    });
}

Have you actually added Wix Multilingual as there is no reference to it in your code:
https://support.wix.com/en/article/getting-started-with-wix-multilingual
https://support.wix.com/en/article/translating-your-store-using-wix-multilingual

Also, make sure that you have read the links above as it clearly states:
Important:
Certain text in the Wix store front (e.g. such as the Checkout Page text) is generated automatically and cannot be translated directly. However, in multilingual pages in the following languages, it translates automatically: Arabic, Bulgarian, Chinese (Traditional), Czech, Danish, Dutch, English, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Tagalog, Thai, and Turkish.

Plus you can also use Wix Pay to ‘Create a new payment with custom currency’:
https://www.wix.com/corvid/reference/wix-pay-backend.html#createPayment

Finally, make sure that your manual payment is actually turned on in your settings and that you have completed the manage manual payments section, plus also note the comment on that page about manually updating orders:
https://support.wix.com/en/article/setting-up-manual-offline-payments