Stripe iOS integration get payment transaction id - ios

I have integrated Stripe with iOS and the payments are working with the test cards, however, I cannot find a way to get payment transaction id so that I can store the transaction id on my server for future reference.
I looked into STPPaymentResult and STPPaymentContext but couldn't find anything.
So is there a way I can get the transaction id after the payment has been charged using Stripe in iOS application?

I found that STPPaymentResult returned during didCreatePaymentResult does contain transaction id. You can get it by paymentResult.source.stripeID

Related

Square - How to get ApplicationID using OAuth for Payment Form

Can someone help me to understand how make Payment Form works for merchants?
I am working on ECommerce site where merchants can sell their products. To use Square as payment provider I used OAuth to retrieve access token (which works fine).
To take payment I use Payment Form (to get card nonce). On Payment Form init I need to send ApplicationID & LocationId. I'am able to get last one but not the first one param.
If I try to use my own ApplicationID I get the error on Transactions/Charge
{
"errors":[{
"category":"INVALID_REQUEST_ERROR",
"code":"NOT_FOUND",
"detail":"Card nonce not found in this `sandbox` application environment. Please ensure an application ID belonging to the same environment is used for the SqPaymentForm."
}]
}
This error happens when you use a combination of sandbox application Ids and production application Ids. I'm guessing that you are using your correct application id, and attempting to charge with your sandbox access token.
If you want to take a sandbox payment with the payment form, use your sandbox application id, it should look like sandbox-sq0idp-XXXXXXXXXXXXXXXXXXX
Each merchant must use their own credentials to load locations. You must send the merchant locationId selected and their access_token to do the charge in its account.
Carlos

How do we get transaction fee amount from paypal?

I am using PayPal iOS sdk to accept payment from user in my iOS app. I am using sandbox for testing. The payment is working fine, I am getting successful payment response along with Payment_ID. I am passing that Payment_ID to my server and from there using REST API (Show payment details), I am trying to retrieve all the information related to that payment but it is not consistent response.
Sometimes I am getting transaction_fee while sometimes it does not return in API response.
I see there is another NVP/SOAP method to get details but that requires transaction_id while i am only having Payment_ID.
does anyone have solution on how to get transaction fee from paypal?
I got the solution now!
I was receiving Payment_ID in response from from Paypal iOS SDk after payment successfully done. I am passing that to my server and the server is calling Show payment details REST API to get all payment details
GET /v1/payments/payment/payment_id
In above API response for some cases when transaction state is completed, paypal does not returning transaction_fee_amount. but it returns sale-->id (transactionId).
Using Paypal PHP Library, I used that transactionId and made NVP call for below API,
https://developer.paypal.com/docs/classic/api/merchant/GetTransactionDetails_API_Operation_NVP/
Voila!! In successfull response of that I am getting all the details for that transaction.

Changing the pay to account for PayPal mobile transactions

I am using the latest PayPal 2.01 SDK for mobile transactions. I have 2 PayPal business accounts (sales1 and sales2) and based on the transaction I would like to choose which account the transaction is paid to. I have a client ID for each account and want to choose which ID to use for the [PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction: ClientId] call. After I have initialized once, the next initialization is ignored and the client Id is not changed. Can someone tell me how to force the initialization to change the client Id.
if (condition) {
DLog(#"using PP Sales2 account");
[PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction: kPayPalSales2Id,
PayPalEnvironmentSandbox: kPayPalTest2Id}];
} else {
DLog(#"using PP Sales account");
[PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction: kPayPalSalesId,
PayPalEnvironmentSandbox: kPayPalTestId}];
Dave from PayPal here.
The scenario you describe, of switching clientId within a single session, is not one that we have designed the PayPal iOS SDK to handle.
Feel free to post this as an Enhancement request at our github repo.

Paymill pre-create card payment

Is there a way to pre-create a card payment for Paymill? When creating a Paymill Payment object we need a token, this token is got by provide card info and amount/currency. With the first transaction of this payment object, Paymill require the same ammount/currency as the value we use to get the token. So the user can't create a payment for future transaction because they don't know how much they pay for the first transaction?
Thanks
you could do it in the following way. Create a token with an amount/currency for example 100 Euro (but not smaller than 1 Euro!). Afterwards make directly with this token a preauth transaction. You get an paymentobjectid as response and the creditcard is checked if it is valid and has at this time the wanted amount (limit is not exceeded). This preauth is valid for 7 days and afterwards it is deleted automatically or your make a reversal of the preauth. With the paymentobjectid you can than make another recurring payment with a different amount.
Best,
Christian

PayPal Sandbox - CreateBillingAgreement call returns Internal Error (10001)

I'd appreciate any help with this, I've run around in circles trying all sorts of combinations with the PayPal Api - but I'm hitting a brick wall on this one.
I'm looking to call the CreateBillingAgreement method but each time I do it fails and reports a 10001 'internal error' from paypal in the response.
I have a valid token and I'm using version 84.0. I've successfully called SetupExpressCheckout and DoExpressCheckout, both of which succeed and the payment goes through. I'm setting up a future payment / pre-authorisation on the SetupExpressCheckout and the user agrees to that no problems.
​Do I need to change settings on the merchant in the sandbox? Am I calling things in the wrong order maybe? (SetExpress, GetExpress, DoExpress, CreateBilling)?
​I'm looking to use this billing agreement to allow a reference transaction in the future. I'm having a test account 'pay' using paypal and not forwarding any credit card details, the payment is for a digital service with no delivery (no shipping is set, no addresses or delivery costs are involved). The overall goal is to provide a one-click re-order button, whereby no details need to be entered by the customer.
I'm using the C# api in asp.net 4, or more specifically I've created Service References from the paypal sandbox wsdl and I'm using those in asp.net.
​Any and all help is appreciated - thanks.
​Russell.
You don't need to call CreateBillingAgreement if you're specifying billingtype MerchantInitiatedBilling in your SetExpressCheckout and DoExpressCheckoutPayment API call. CreateBillingAgreement is only necessary if you don't want to call DoExpressCheckoutPayment.
If MerchantInitiatedBilling is set, DoExpressCheckoutPayment will already return a billing agreement ID, which you can use in DoReferenceTransaction.
I don't have access to an example at hand, but will update this post as soon as I've found one for you.

Resources