Stripe : Call to a member function getCustomer() on null

  • Posts: 143
  • Thank you received: 9
6 years 3 days ago #300748

-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9
-- PHP version -- : 7.2
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Call to a member function getCustomer() on null

Hi, we configured the new bought stripe connect to our site and having this error problem :
snap.ashampoo.com/F48H2dF02It0AUfKxqu1Cp...qrhIC3DflolgxHjVxXZe
Configuration in stripe plugin :
snap.ashampoo.com/HkSM1jQUlnoYVwrzOMUXEE...RVsbdHzimltboS55e0SA
We are with test credentials from Stripe, test informations are :
4242 4242 4242 4242
04 / 24
242
postcode 42424

Any idea ?
Regards,
Olivier

Last edit: 6 years 3 days ago by ButterflyPixel.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 2 days ago #300765

Hello,

Please re-download the Stripe Connect (payment) plugin.
Because you do not have a ClientID, the API class is not loaded has it should be.
I removed the requirement on the ClientID ; so it should be better !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 143
  • Thank you received: 9
6 years 2 days ago #300768

Thanks !

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
5 years 11 months ago #300958

I was also getting this error and I saw your post, so now I updated the plugin and the error is different now.

The order gets cancelled, and in the Stripe Log I can see that both POST/ v1/Tokens and POST / v1/Charges fail with error 400.

Her is the Stripe log response for the Tokens:

{
  "error": {
    "message": "Must authenticate as a connected account to be able to use customer parameter. See https://stripe.com/docs/api#create_card_token for more details.",
    "param": "customer",
    "type": "invalid_request_error"
  }
}
I hope it helps.

Attachments:
Last edit: 5 years 11 months ago by Jerome. Reason: [code] tag is nice

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 11 months ago #300967

Hello,

Please re-download the HikashopPayment Stripe Connect plugin.
It looks like you're using the "preferred charge" in "direct" mode but, without a vendor, the result is not a good one.
I change the algorithm in order to not use the "direct" charge when there is no vendor ; it should avoid your issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
5 years 11 months ago #301045

Thank you for the fast response! It seems to have fixed it. I could complete a transaction in test mode. The only thing that is not working as expected is that the customer doesn't receive a confirmation email in the right language (always in English even though he ordered form the French or Spanish version of our shop).

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 11 months ago #301062

Hello,

HikaShop has a column to store the language when an order is created ; so it can use that language when the order notification are sent.
With modification in the language override system (due to Joomla 4 support) ; it might be something related.

In order to avoid such kind of problem, we can add the "lang" parameter in the notification URL to ensure the customer current language will be used by Joomla during the IPN process.
The idea is to change the line (in the plugin) :

$this->notifyurl = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment='.$this->name.'&tmpl=component&order_id='.$order->order_id;
By
$this->notifyurl = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment='.$this->name.'&tmpl=component&order_id='.$order->order_id.'&lang='.$this->locale;

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
5 years 11 months ago #301105

Thanks. Is it something that you will add to the plugin later, or do we have to edit the code?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 11 months ago #301106

Hello,

It will be added in the plugin with the next update.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: earmaster

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
5 years 11 months ago #301158

Awesome, thanks a lot!

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum