bambora / checkout-magento-v2.x

Bambora Online - Magento 2
https://www.bambora.com/sv/se/betalningslosningar/
3 stars 13 forks source link

Purchasing virtual products without shipping address doesn't work using epay payment window #21

Closed boxyman closed 6 years ago

boxyman commented 6 years ago

This issue has not been fixed. It works if you purchase a regular product. But not when purchasing a virtual product.

I am using Magento 2.2

I it helps, here are two calls with responses I get when purchasing a virtual products. When entering the checkout the shipping address step is skipped because it is a virtual product. I suspect that is the problem.

Status code: 200
https://domain.com/rest/dansk/V1/guest-carts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/payment-information

{  
   "cartId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
   "billingAddress":{  
      "countryId":"DK",
      "region":"",
      "street":[  
         "Some street 123"
      ],
      "company":"",
      "telephone":"12345678",
      "postcode":"2000",
      "city":"København",
      "firstname":"Kaj",
      "lastname":"Kajsen",
      "saveInAddressBook":1,
      "custom_attributes":{  

      }
   },
   "paymentMethod":{  
      "method":"bambora_epay",
      "po_number":null,
      "additional_data":null,
      "extension_attributes":{  
         "agreement_ids":[  
            "1"
         ]
      }
   },
   "email":"kaj@kajsen.dk"
}

Status code: 500
https://domain.com/bambora/epay/checkout/?_=xxxxxxxxxxxxx

Here is an example of a regular product:

Status code: 200
https://domain.com/rest/dansk/V1/guest-carts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/payment-information

{  
   "cartId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
   "billingAddress":{  
      "countryId":"DK",
      "region":"",
      "street":[  
         "Some street 123"
      ],
      "company":"",
      "telephone":"12345678",
      "postcode":"2000",
      "city":"København",
      "firstname":"Kaj",
      "lastname":"Kajsen",
      "custom_attributes":{  

      },
      "saveInAddressBook":null
   },
   "paymentMethod":{  
      "method":"bambora_epay",
      "po_number":null,
      "additional_data":null,
      "extension_attributes":{  
         "agreement_ids":[  
            "1"
         ]
      }
   },
   "email":"kaj@Kajsen.dk"
}

Status code: 200
https://domain.com/bambora/epay/checkout/?_=xxxxxxxxxxxxx
AllanWLie commented 6 years ago

Hi @boxyman

I was able to reproduce your issue. We will look into it and make a new release when the error is corrected. A temporary fix is to set "Enable Invoice data" to "No" in the module configuration

image

AllanWLie commented 6 years ago

Hi @boxyman

The issue have now been fixed. The new release is available here: https://github.com/bambora/checkout-magento-v2.x/releases/latest