react-native-payments
react-native-payments copied to clipboard
Cannot read property 'recipient' of null
While performing a PaymentRequest, requesting PayerName and PayerEmail via Apple Pay, I am getting a JS error:
Cannot read property 'recipient' of null
It is trying to find the shipping option recipient, but there is no shipping requested.
const OPTIONS = {
requestPayerName: true,
requestPayerEmail: true,
};
In debugger, here is the offending line, where this._shippingAddress evaluated as null:
payerName: this._options.requestPayerName ? this._shippingAddress.recipient : null,
i got the same error
+1
@mgarabedian how did you get past this?
I never did, and couldn't get it to reliably work. Ended up using tipsi-stripe for my project.
@mgarabedian will tipsi-stripe get past the iOS app store?
@lenichols @mgarabedian I was also getting the same error and I was able to fix it by setting requestShipping to false, like below -
const OPTIONS = { requestPayerName: true, requestShipping: false, };