Stripe USD currency with indian user - asp.net

I have successfully integrated Stripe Payment Gateway Successfully with my Project.
I am having a problem. My Currency is "usd". When an Indian user tries to make a payment and gives the address of India, It gives an error saying Non-INR transactions in India should have shipping/billing address outside India. More info here: https://stripe.com/docs/india-exports.
When a user from outside India does the payment, It happens successfully.
kindly help me with this issue.

On further docs reading i have successfully made the payment by providing address and shipping to the payment intent object like this,
I am trying to make a usd payment.
U need to have address object while creating a customer
return stripe.customers.create({
email: 'test#gmail.com',
name: 'test',
source: stripetoken,
address: {
line1: '510 Townsend St',
postal_code: '98140',
city: 'San Francisco',
state: 'CA',
country: 'US', (In your case it's different so sure to change it)
}
})
Add shipping address object in payment intents like,
stripe.paymentIntents
.create({
amount: '199',
currency: 'usd',
// payment_method_types: ['card'],
off_session: true,
confirm: true,
customer: customer.id,
description: "yesss",
shipping: {
name: 'test',
address: {
line1: '510 Townsend St',
postal_code: '98140',
city: 'San Francisco',
state: 'CA',
country: 'US',
},
},
}),
Hope it's works Thanks.

This is expected. Export transactions must be in non-INR currency and domestic transactions must be in INR. There is, currently, no workaround for that.
https://support.stripe.com/questions/supported-payment-methods-currencies-and-businesses-for-stripe-accounts-in-india
https://support.stripe.com/questions/requirements-for-india-export-charges

Related

Convert PushNotification.localNotification to firebase push notification

I am working on a school thesis with the concept of Geofence. For my project, i have made notifications to arrive based on the boundary events. The project works with local notifications coming based on events:
Boundary.on(Events.ENTER, id => {
console.log('Background Enter');
PushNotification.localNotification({
channelId: 'boundary-demo',
title: 'ENTER SIGNAL',
message: `You've entered region: ${id} in background`,
importance: 'max',
priority: 'max',
ignoreInForeground: false,
allowWhileIdle: true,
});
});
Boundary.on(Events.EXIT, id => {
console.log('Background Exit');
PushNotification.localNotification({
channelId: 'boundary-demo',
title: 'EXIT SIGNAL',
message: `You've left region: ${id} in background`,
importance: 'max',
priority: 'max',
ignoreInForeground: false,
allowWhileIdle: true,
});
});
I am making a single app, which 2 users can login and use (Parent and child)
Right now, because it is using localnotification, One device can recieve the notification. But i need the same notifications to come at both devices.
So how do I convert PushNotification.localNotification to Firebase Push Notification.
NOTE: Both users have been linked together with firebase realtime database.
Please help, thank you so much

Custom metric/dimension not visible in GA4 DebugView on item/product-list level

We're trying to configure GA4 to gather same data that we have in UA.
The problem is that we cant see custom metrics data on item-level in DebugView.
In TagAssistant we can see that data is sent:
{
event: "purchase",
gtm: {uniqueEventId: 10, start: 1651XXX},
gtag: {
targets: {
G-XXX: {_ee: true, _uei: 3, _upi: 2},
UA-XXX: {
currency: "PLN",
country: "PL",
custom_map: {
dimension2: "referrer",
...
dimension13: "ecomm_totalvalue",
metric1: "metric1",
...
metric5: "metric5"
},
_uei: 4
},
AW-106XXX: {}
}
},
eventModel: {
transaction_id: "40XXX",
affiliation: "XXX",
value: "9.99",
currency: "PLN",
tax: "1.87",
shipping: "0",
coupon: "",
items: [
{
id: "670",
name: "Tusz Zamiennik T0711 do Epson (C13T07114010) (Czarny)",
brand: "XXX",
category: "Wkłady/Atramentowe/Zamienniki/Tusze/XXX -> Do:E" +
"pson",
quantity: 1,
price: "9.99",
coupon: "",
metric1: "9.99",
metric2: "9.99",
metric3: "9.99",
metric4: "9.99",
metric5: "9.99"
}
],
send_to: ""
}
}
However, on DebugView side we can see purchase event that:
contains all orginal parameters on event level (like transaction_id, shipping etc.)
contains all orginal parameters on item level (like item_id, quantity, etc.)
But our custom metrics are missing
In the other hand, we tried (with different event) push some custom-dumension data and:
they are visible on GA4 DebugView
we can create custom dimension in GA4 basing on this data and it works
I am thinking about:
Creating event-level custom metric to test if it will be passed to GA4 DebugView
Creating item-level custom dimension to test if it will be passed to GA4 DebugView
However, due to fact that GA requires 24h to make conclusions i decided to ask here for any sugestions why it is not working and what else may i test.

Firebase Custom Authentication - lastSignInTime = Null

I'm using 'firebase-admin' for node to create custom tokens based on users created using admin.auth().createUser(params) and updated via admin.auth().updateUser(userId, updateParams)
However, when a custom user is created, such user's "signed in" field is "null" in the Firebase Authentication Dashboard as well as when I fetch user record using admin.auth().getUser('custom:uid').then((userRecord) => { console.log(userRecord.toJSON()); })
Below is the result from fetching user record (I have masked credentials):
{
uid: 'custom:uid',
email: 'xxx#yyy.com',
emailVerified: false,
displayName: 'testuser',
photoURL: 'https://xxxx.jpg',
phoneNumber: undefined,
disabled: false,
metadata: {
lastSignInTime: null,
creationTime: 'Mon, 29 Mar 2021 08:11:56 GMT'
},
passwordHash: undefined,
passwordSalt: undefined,
customClaims: undefined,
tokensValidAfterTime: 'Mon, 29 Mar 2021 08:11:56 GMT',
tenantId: undefined,
providerData: []
}
and below is my dashboard screenshot:
My question is what should I do to update 'lastSignInTime', so that it correctly updates upon a user sign in? I assumed that either when I createUser() or updateUser(), Firebase shall automatically record the "Signed In" field (as it did for "Created"), which it did not do.
The value of "Signed In" will update when the user signs in for the first time. As far as I'm aware there's no other way to update that value.

I Want To Create A Collection Of Customers In Fire store And I want Invoices to be Associated with that collection in firebase

Customers: [
{
Name:"helloWorld",
Phone:123,
Address:"address1",
Invoices:[{
product1:"sa",
price:"4500",
totalAmount:123,
},
{
product1:"Bca",
price:"2600",
totalAmount:2500,
}
]
},
{
Name:"NewCus",
Phone:788888888,
Address:"address2",
Invoices:[{
product1:"ase2",
price:"6500",
totalAmount:9000,
},
{
product1:"Bca",
price:"bha",
totalAmount:2500,
}
]
}
],
There are a lot of ways to do this. One option is to start with a users collection
users
uid_0 //john's uid from their auth object
name: "John"
uid_1
name: "Paul"
and then invoices are stores in an Invoices collection with a reference to the users uid
invoices
invoice_0
amount: "$100"
user: "uid_0"
invoice_1
amount: "$50"
user: "uid_0"
invoice_2
amount: "$22"
user: "uid_1"
From the above, user John has two invoices; $100 and $50, and uid_1 has one in invoice for $22
Depending on the queries you want to run you could also store a list of a users invoices within the users document as well.
users
uid_0 //john's uid from their auth object
name: "John"
invoices:
invoice_0: true //true is a placeholder value
invoice_1: true

How to push Ecommerce Transactions to GTM Data Layer

I'm pushing some tags to the data layer and they all seem to be working as expected except for ecommerce transaction data. I have confirmed that the transaction data is being pushed to the data layer but for some reason I'm not seeing any results in Google Analytics—even after waiting 48 hours.
I should mention that this is an SPA so there is no page refreshing. The data is pushed to the data layer after the payment is successfully processed.
This is the data I'm sending:
{
event: 'subscribe',
user: <USER_ID>,
subscribe: {
transactionId: <CUSTOMER>,
transactionAffiliation: <AFFILIATION>,
transactionTotal: <PRICE>,
transactionProducts: [
{
id: <CUSTOMER>,
sku: <SUBSCRIPTION>,
name: <PLAN>,
price: <PRICEPER>,
quantity: <QUANTITY>
}
]
}
};
Is there something wrong with the way I'm formatting this? Any ideas why this doesn't seem to be working?
For just regular NOT enchanced ecomm, you need to make some adjustments to your datalayer first:
{
event: 'subscribe',
user: <USER_ID>,
transactionId: <CUSTOMER>,
transactionAffiliation: <AFFILIATION>,
transactionTotal: <PRICE>,
transactionProducts: [{
id: <CUSTOMER>,
sku: <SUBSCRIPTION>,
name: <PLAN>,
price: <PRICEPER>,
quantity: <QUANTITY>
}]
};
Then create a custom event trigger referencing the subscribe event:
Then create a GA tag and select Track Type of Transaction, elect your GA settings variable and set the trigger to that custom event trigger we created above:

Resources