#jared-ios-taptopay
1 messages ยท Page 1 of 1 (latest)
can you share your code as text not pictures? Can you also give a bit more details about which parts returns error 1920 and if you get any more than just the code?
jared-ios-taptopay
sure, one sec, first I call, discover readers and that returns successfully
then we call createIntent in the second screenshot, after that we call collect payment method
please no pictures
we're both devs, I can't do anything with pictures or really small text
๐
Just share the exact raw code, it can be formatted on Discord like you would on most tools
I also need the exact/detailed error you get beyond just the code
1920 is defined here https://github.com/stripe/stripe-terminal-ios/blob/28370e9ae404fe18b8b912824658e0d1103a37e2/PublicHeaders/SCPErrors.h#L150 but should come with more details
here is the entire controller
here is the header file associated with it
//
// NewChargeController.m
// PocketSuite
//
// Created by Yang Forjindam on 6/30/19.
// Copyright (c) 2019 PocketSuite. All rights reserved.
//
#import "User.h"
#import "Invoice.h"
#import "Payment.h"
#import "BEMCheckBox.h"
#import "SearchController.h"
typedef enum {
CHARGE_TYPE_AMOUNT,
CHARGE_TYPE_ITEMIZE,
CHARGE_TYPE_AMOUNT_OR_ITEMIZE,
CHARGE_TYPE_EMPLOYEE
} CHARGE_TYPE;
@interface NewChargeController : SearchController<UITableViewDelegate, UITableViewDataSource, BEMCheckBoxDelegate>
@property (nonatomic, retain) Payment *record;
- (id)initWithClient:(User *)client;
- (id)initWithInvoice:(Invoice *)invoice;
- (id)initWithBooking:(Booking *)booking;
- (id)initWithPackage:(Package *)aPackage;
- (id)initWithCharge:(Charge *)charge;
+ (void)newCharge:(PocketController *)pocketController client:(User *)client;
+ (void)sendPayment:(PocketController *)pocketController person:(User *)person;
@end
So where is it failing exactly, what exact error do you get, can you log all the details and share that?
please be patient I am getting you that info
Here is the error,
It is failing after calling
ln:422 in the .m file
[[SCPTerminal shared] collectPaymentMethod:result
with the error
@"A required parameter was invalid or missing."
cool can you share the lines around that error?
First we call this and it returns successfully, do you want the server code that creates the intent?
here is fetch card where it fails
- (void)fetchCard:(SCPPaymentIntent *)result {
if (self.checkoutType == CHECKOUT_TYPE_READER)
[self setReaderStatus:READER_STATUS_READY];
__weak NewChargeReaderController* weakCR = self;
self.collectCancelable = [[SCPTerminal shared] collectPaymentMethod:result
completion:^(SCPPaymentIntent *collectResult, NSError *collectError) {
if (collectError) {
[weakCR setReaderStatus:READER_STATUS_WARNING statusDisplay:collectError.localizedDescription];
}
else {
// reset local payment intent variable, so we don't try to cancel it on view disappear
weakCR.currentPaymentIntent = nil;
[weakCR setReaderStatus:READER_STATUS_AUTHORIZING];
[weakCR chargeCard:collectResult];
}
}];
}
can you share a PaymentIntent id?
@"pi_3MrPyZDxdeYXpVhR1heRnRqz"
@"acct_1MkDl0RXdrCyx91A"
That one is a new intent that I just created, and failed
thanks looking
Okay so you set on_behalf_of on PaymentIntent creation but not when you initialized Terminal
I tried leaving that out and get the same error but I can set it to null their too