Stripe differentiate between payment Intent and payment link - laravel-5

I'm trying to read the webhook response from both a payment intent (in which a user in the website press pay to pay for an item) and a payment link (where he receives a link which then he can pay through) I'm trying to find how can I differentiate between them but I can't find a difference. Is there a flag or something to distinguish which one was paid

PaymentLinks[1] are a way to accept payment without building a storefront. It uses PaymentIntents[2] behind in order to accept payment.
Actually, when you create a PaymentLink, Stripe creates a Checkout Session[3] and a PaymentIntent for each payment attempt.
In order to track payments issued from PaymentLinks[4] using webhooks,you should listen to one of these events depending on your exact need:
checkout.session.completed [5] to track when customers completed a payment.
payment_intent.succeeded [6] to track when a Payment was done successfully.In order to distinguish between PaymentIntent that you’ve created by your own and from the ones are created by PaymentLinks, you can add metadata[7] when you create PaymentIntent from your website.
[1] https://stripe.com/docs/payments/payment-links
[2] https://stripe.com/docs/payments/payment-intents
[3] https://stripe.com/docs/payments/checkout
[4] https://stripe.com/docs/payments/payment-links/api#tracking-payments
[5] https://stripe.com/docs/api/events/types#event_types-checkout.session.completed
[6] https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded
[7] https://stripe.com/docs/api/payment_intents/create#create_payment_intent-metadata

Related

RingCentral Main Company Number SMS `Phone number doesn't belong to extension` error

I tried to send SMS and listed the from as our Main Company Number but it would not go out. Said Phone number doesn't belong to extension per the error below. The RC account I am using for running my API calls does not have a phone line/number assigned.
Do I have to be logged in with the account that matches the from phone number?
{
"errorCode": "FeatureNotAvailable",
"message": "Phone number doesn't belong to extension",
"errors": [
{
"errorCode": "MSG-304",
"message": "Phone number doesn't belong to extension"
}
]
}
You can send SMS from the Main Company Number for a single user or multiple users using the following approaches:
Scenario 1: Send and Respond using a single user
In-order to send SMS from the main company number:
Set the Operator Extension
Authorize using the Operator Extension
Send SMS using the Main Company Number
Operator Extension: When a caller presses 0 (zero) or does not enter an extension number, the system connects the call to the designated operator extension by default. An Administrator can configure the operator extension
to have different call handling rules.
Scenario 2: Send and Respond using Multiple Users
In-order to send and SMS from Main Company Number and respond to it using multiple users, set up a call-queue and configure the operator extension to point to the Call Queue.
Create a Call-Queue and assign a password to it.
Set the Operator Extension to point to Call Queue.
Authorize using the Operator Extension ( Call Queue )
Send SMS using the Main Company Number
More info is available here:
https://devcommunity.ringcentral.com/ringcentraldev/topics/how-to-send-sms-from-the-main-company-number
To verify the numbers your user extension can send SMS from, call the following endpoint:
GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number
This will return an array of phone numbers. Check the features property. The ones that can be used will have the SMSSender and/or MMSSender features. More info on this is available in the Developer Guide:
http://ringcentral-api-docs.readthedocs.io/en/latest/messages_sms-and-pager/#listing-valid-sms-sending-numbers

Virtuemart not sending new order "pending status" email

When i somebody create a new order that the status is pending, the virtuemart does not send the email order.
It sends just if the status is confirmed, or any others.
Someone know what can it be?
Answer from https://forum.virtuemart.net/index.php?topic=126593.0
The problem before was, that the email was sent twice. So we removed
sending emails for orderstatus Pending. Orderstatus Pending means that
the customer put something on the cashdesk, but did not pay or confirm
the order.
The only solution I've found and use:
In file
components/com_virtuemart/helpers/shopfunctionsf.php
ctrl+f to
$orderstatusForShopperEmail = VmConfig::get('email_os_s',array('U','C','S','R','X'));
On next line add
$orderstatusForShopperEmail[] = "P";
In VirtueMart 3.4 it is again possible to receive an email for order status P, Pending, but only for the vendor.
The status "pending" is triggered once you hit the payment button and ends when the payment plugin sends a command to change the status into a new status like confirmed.
If in the time between these two processes something goes wrong the status will stay on pending.
For a successful payment the status should never be P "pending" even though it is possible to choose it in that way.
For payment methods that do not process the payment immediately like "invoice", meaning waiting for a payment via bank transfer or similar, status U "confirmed by shopper" should be used. It is often seen that in this case "Pending" is used, please don't do that.
Please rename "confirmed by shopper" into "my pending", so you got a status "pending" for stuck payments in the shop system, and a "my pending" for pending payments after a successful order process.
The latter status U will send emails to the vendor and shopper if you choose so in VM configuration, tab Orders (formerly called Email).

Have public channels visible to all non admin users and forbid user from creating channels

How can I have the existing public channels visible to all users ?
How can I forbid users (non admin) from creating channels ?
Version: 0.49.0
The way I handled this was to create two main channels (Lobby and Announcements) for all of my employees.
I then used the REST API to add all users to those two channels. This won't prevent them from leaving the channels, but you could simply call the API every so often to add people back in that left (or new users, if setting the Default channel to True under Rooms in Administration doesn't seem to be working).
Here's the steps to do this, using curl:
Get your authentication Token and UserId [1]
Use your Token and Id from step 1 to get the full channel list [2]
Take the desired roomId from step 2 and (as well as using your Token and Id from step 1) use the addAll API [3] to add literally all users to the channel.
For the second one, you can use the Permissions [4] tab under Administration, it is "create-c" for public or "create-p" for private.
I can't post more than two links, so..
[1] httpx://rocket.chat/docs/developer-guides/rest-api/authentication/login
[2] httpx://rocket.chat/docs/developer-guides/rest-api/channels/list
[3] https://rocket.chat/docs/developer-guides/rest-api/channels/addall
[4] https://rocket.chat/docs/administrator-guides/permissions/

.NET Braintree : Transactions sent as charged for settlement never settled

I am integrating Braintree payment option in a site, currently in sand box. The setup was easy, docs helped a lot but I am confused about one thing.
When I submit a transaction as a settlement, it processes the transaction and also shows in transactions in the control panel but it is never settled. I want to know how can I be sure if the customer was charged so I can deliver the service he requested.
If an amount does not settle, and I have delivered the product then It will be a problem for my client.
It is showing all the transactions as this, including the paypal ones.
Please see the attached screen shot.
The code I am using:
var request = new TransactionRequest
{
Amount = 33.22,
PaymentMethodNonce = nonce,
OrderId = CustomerOrderId,
Options = new TransactionOptionsRequest
{
SubmitForSettlement = true
}
};
Usually BrainTree Settles all the transaction with in a time period(it may take a day).
submitted_for_settlement: This means a transaction has made which would get settled, but not immediately when the transaction occurs.
The real settlement happens under Disbursement, this runs daily and here they will disburse all the transactions which are in submitted_for_settlement status and during this process only
I would suggest you to add Disbursement Webhook in to your application, this helps you to get all the details of the disbursement from braintree.
Don't forget to save the Disbursement ID value, which you will get from disbursement webhook ONLY. We cannot see the disbursement ID in their console.
Use of Disbursement ID - this ID will be in the buyers CC Billing
To implement this please follow this docs.
https://developers.braintreepayments.com/reference/general/webhooks/disbursement/dotnet
https://developers.braintreepayments.com/guides/webhooks/parse/dotnet

Cancel appointment and associated resources in Outlook when created using EWS Managed API

I am using the EWS Managed API to create appoitments on Exchange 2010.
Appointment appointment = new Appointment(exchangeService);
appointment.Subject = "Sample meeting";
appointment.Body = "Sample meeting body";
appointment.Start = bookingInfo.from;
appointment.End = bookingInfo.from.AddMinutes(bookingInfo.duration);
appointment.Location = meetingRoom.displayName;
appointment.Resources.Add(<my_room_mail>);
// Send the meeting request to all attendees and save a copy in the Sent Items folder.
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);
This piece of code create effectively an appoitment in my Outlook but the Meeting Room included as a resource is marked as a "tentative" (not really accepted). So when I want to delete the meeting, the meeting room stay booked (busy/tentative) for the slot and it is impossible to delete the tentative.
If I delete the appoitment from the EWS code (using the appoitment ID), it works as expected, the room is effectively free.
Appointment appointment = Appointment.Bind(exchangeService, new ItemId(itemId));
appointment.Delete(DeleteMode.MoveToDeletedItems);
Do you have any idea of what is the problem ? Outlook right ? Bad appoitment creation or resource booking ?
Ok, I understand that Direct Booking is not compatible with EWS/OWA/Mobile solutions (and also with Outlook 2010/2013 without register tweak).
Direct Booking and Resource Booking Attendant (Auto Accept feature) are conflicting technologies, and if enabled together, unexpected behavior in calendar processing and item consistency can occur.
Check this for more details :
http://msexchangeanswers.blogspot.fr/2009/08/outlook-direct-booking-vs-auto-accept_17.html
http://exchangeserverinfo.net/2013/05/remove-auto-accept-from-outlook-for-all-room-mailbox/
The resource room needs to auto-accept the invitation, so it loses its tentative status. Then when you delete the appointment from your calendar, it should automatically send cancellation to the room. There is a setting on the delete to do this, and I forget off the top of my head if it's the default or not, but I think the initial issue is why the room is not configured to accept or reject the invite sent.

Resources