#cdd_terminal-connect-integration

1 messages ยท Page 1 of 1 (latest)

meager laurelBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1274064404362563658

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

cloud leaf
#

This is basically the code:

initializeStripe(key: string): void {
this.stripeService.setKey(key);
this.showCard = false; // Hide the card component to allow re-initialization
setTimeout(() => {
this.showCard = true; // Show the card component again after a brief delay
}, 50); // Adjust the delay if necessary to ensure proper re-rendering
}

private waitForCardComponentToRender(): Promise<void> {
return new Promise((resolve) => {
setTimeout(() => resolve(), 100); // Wait for the card component to re-render
});
}

async buy(): Promise<void> {
this.fetching = true;
this.disablePayButton = true;
const name = this.stripeTest.get('name').value;
const tokenIds:any[] =[];

// Set the first key before the first token creation
this.initializeStripe(this.publicKeyForFirstTranscation);
await this.waitForCardComponentToRender();


this.handleSubscription(this.stripeService.createToken(this.card.element, { name }),
  async (result) => {
    if (result.token) {
      // this.chargeCard(result.token.id);
      tokenIds.push(result.token.id);

      // Set the second key before the second token creation
      this.initializeStripe(environment.STRIPE_PUBLIC_KEY);
      await this.waitForCardComponentToRender();

      this.handleSecondTokenCreation(tokenIds, name);          
    } else if (result.error) {
      this.disablePayButton = false;
      this.toastMessage.errorToastWithClose(result.error.message);
    }
  },
  (err) => {
    console.log(err)
    this.fetching = false;
    this.disablePayButton = false;
    this.toastMessage.errorToastWithClose('Failed to Create Order');
  }
);

}

delicate haven
#

Hi ๐Ÿ‘‹

  1. What Stripe Terminal device are you using?
  2. What integration are you using?
#

What are you referring to when you reference a Stripe card reader?

cloud leaf
# delicate haven Hi ๐Ÿ‘‹ 1. What Stripe Terminal device are you using? 2. What integration are yo...

Hello,

I'm developing using Angular and a Spring Boot Backend and we are trying to use Standard Stripe accoutns rather than express due to the dashboard, and the loan features that standard accounts provide customers.

We are currently using a P400 verifone because we have had it for a few years now but will upgrade to the latest card readers if we need to. I also have the Stripe M2 reader for Android and Ios.

delicate haven
#

P400s have hit EoL and are no longer supported.

cloud leaf
#

No worries. Will the latest card readers support what I'm trying to do?

delicate haven
#

I'm still not clear on that.

cloud leaf
#

I do have the Stripe M2 reader.

delicate haven
#

Any Stripe terminal reader can only process a single payment in a single session

#

Can you describe in clear steps what your code is doing?

cloud leaf
# delicate haven I'm still not clear on that.

Let's say an order totals $10, and I want to charge a $0.25 fee for using my app. My goal is to charge $10 for the order and an additional $0.25 as a fee for my app. From my understanding, if I'm using a Standard Account, I would need to process these as two separate transactions.

Is there a way to collect the application fee without needing to switch to an Express Account?

delicate haven
#

Okay sorry that is even more confusing.

When you say you are using a Standard Account, do you mean you are acting as the Platform and your Connect Accounts are Standard Accounts?

cloud leaf
delicate haven
#

Yes exactly like. I'm having customers who use my app enter their API key in the settings page.
This is extremely bad practice and actively discouraged

cloud leaf
#

Excellent I'll do that change then, and then for the processing transactions do you know how
I could handle that?

delicate haven
#

Okay well are you trying to create Subscriptions or one-off Payments?