LeonidVeremchuk / flutter-google-pay

Flutter Google Pay
Other
14 stars 18 forks source link

Exception on custom payment #7

Closed v0l closed 4 years ago

v0l commented 4 years ago

Hi,

Having a problem using the custom payment method, i get an error like this:

Attempt to invoke interface method 'java.util.Set java.util.Map.entrySet()' on a null object reference

My custom payment data is like this:

{
    "allowedPaymentMethods": [{
        "type": "CARD",
        "parameters": {
            "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
            "allowedCardNetworks": ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"]
        },
        "tokenizationSpecification": {
            "parameters": {
                "gateway": "worldpay",
                "gatewayMerchantId": "XXXXXXX"
            },
            "type": "PAYMENT_GATEWAY"
        }
    }],
    "apiVersion": 2.0,
    "apiVersionMinor": 0.0,
    "merchantInfo": {
        "merchantName": "XXXXXXX"
    },
    "transactionInfo": {
        "currencyCode": "EUR",
        "totalPrice": 20.0,
        "totalPriceStatus": "FINAL"
    }
}
v0l commented 4 years ago

This fixed it for me: https://github.com/v0l/flutter-google-pay/commit/42d8cfb2e863beb1213058a5eff354c435b95192

v0l commented 4 years ago

Fixed in https://github.com/LeonidVeremchuk/flutter-google-pay/pull/8