Closed satishsharma-riseandinspire closed 4 years ago
Please share the entire stacktrace.
Currently i am using laravel spark 10. We have the following config in our env CASHIER_CURRENCY=inr CASHIER_CURRENCY_LOCALE=en
but when we download and open the invoice, we see "?" symbol instead of '₹' (INR symbol). Same happen in invoice email.
You're sharing 'Call to undefined method'.
. Please share the stacktrace of the error.
Just trying to follow below step : -
The default Cashier currency is United States Dollars (USD). You can change the default currency by calling the Cashier::useCurrency method from within the boot method of one of your service providers. The useCurrency method accepts two string parameters: the currency and the currency's symbol: use Laravel\Cashier\Cashier; Cashier::useCurrency('inr', '₹');
I just saw you're using an older version. Cashier doesn't has a useCurrency
anymore since v10. Please upgrade to the latest version and report the correct Cashier version that you're using next time please.
No, i am using cashier latest version ^11.0
{ "name": "laravel/spark-aurelius", "description": "Laravel Spark provides scaffolding for Laravel SaaS applications.", "keywords": ["laravel", "stripe", "billing", "scaffolding", "saas"], "license": "MIT", "authors": [ { "name": "Taylor Otwell", "email": "taylor@laravel.com" } ], "require": { "php": "^7.2", "ext-json": "", "ext-zip": "", "erusev/parsedown": "~1.0", "firebase/php-jwt": "~4.0|~5.0", "guzzlehttp/guzzle": "~6.0", "ramsey/uuid": "^3.1", "intervention/image": "^2.3", "laravel/cashier": "^11.0" }, "require-dev": { "mockery/mockery": "^1.0", "phpunit/phpunit": "^7.0", "mpociot/vat-calculator": "^1.6" }, "autoload": { "psr-4": { "Laravel\Spark\": "src/" } }, "extra": { "branch-alias": { "dev-master": "9.0-dev" } }, "minimum-stability": "dev" }
There is no useCurrency
method in Cashier v11
I'm suspecting you missed this part in the upgrade guide: https://github.com/laravel/cashier-stripe/blob/12.x/UPGRADE.md#invoices
The useCurrency method has been replaced by a configuration option in the new Cashier configuration file and the usesCurrency method has been removed.
My main issue is Rupee symbol is not showing in invoice pdf. and i am trying below method but its not working.
Currently i am using laravel spark 10. We have the following config in our env CASHIER_CURRENCY=inr CASHIER_CURRENCY_LOCALE=en
but when we download and open the invoice, we see "?" symbol instead of '₹' (INR symbol). Same happen in invoice email.
I get it just find. This sounds like an encoding problem of your output. Please try a support channel:
I totally agree with you but still my question is same. when we download and open the invoice, we see "?" symbol instead of '₹' (INR symbol). Same happen in invoice email. In Application it shows '₹' symbol but in pdf it shows ?. please find below
attachment.
I've already said that this is probably an encoding issue. Please try a support channel from above.
Description:
We have our payment plans in INR (instead of USD). The same currency is configured in Stripe, and the transaction works well. However, when we download and open the invoice, we see "?" symbol instead of '₹' (INR symbol). We have the following config in our env CASHIER_CURRENCY=inr CASHIER_CURRENCY_LOCALE=en CASHIER_MODEL=App\User We have also changed the default currency by calling the Cashier::useCurrency method from within the boot method of the service providers as - Cashier::useCurrency('inr', '₹'); However we received an error - 'Call to undefined method'.
Steps To Reproduce:
We have the following config in our env CASHIER_CURRENCY=inr CASHIER_CURRENCY_LOCALE=en