Hello,

I am testing this module and I have a problem that I have locally and on simplytest.me.

When setting a test payment gateway with Paypay, with the following config:

uuid: e49477a2-a5d1-4299-8ffe-15d3150371ea
langcode: fr
status: true
dependencies:
  module:
    - commerce_paypal
id: paypal_test
label: 'Paypal test'
weight: null
plugin: paypal_express_checkout
configuration:
  api_username: myapiusername
  api_password: myapipassword
  shipping_prompt: shipping_skip
  signature: mysignature
  solution_type: SoleBilling
  display_label: 'PayPal test'
  mode: test
  payment_method_types:
    - credit_card
  redirect_method: post
  _entity_id: null
conditions:
  -
    plugin: order_customer_role
    configuration:
      roles:
        administrator: administrator

I am sent on Paypal, I can pay with my test account but when returning to the website, I obtain the following exception:

Drupal\Core\Entity\EntityStorageException: Missing "payment_gateway" property when creating a payment. in Drupal\commerce_payment\PaymentStorage->doCreate() (line 32 of modules/contrib/commerce/modules/payment/src/PaymentStorage.php).

Am I misconfiguring something?

Thanks for any help.

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: Unassigned » grimreaper

I found a workaround. I will upload a patch soon.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
StatusFileSize
new1.5 KB

Here is the patch.

Thanks for the review.

jsacksick’s picture

Status: Needs review » Closed (won't fix)

Should be fixed by the Commerce patch from #2903178: $this->entityId empty in plugins after a bad export, could you confirm and reopen that issue in case that issue is not fixed?

grimreaper’s picture

Hello,

I have just tested the last dev version of commerce (with you patch commited in it) and the last dev version of commerce_paypal and it works with Express checkout in test mode.

Thanks.