Closed rrepaka closed 7 years ago
Yes, there's a sample in the TakePayment app at the bottom of the PaymentViewController.m
file.
#pragma mark -
#pragma mark Receipts
- (NSArray *)getReceiptOptions {
PPHReceiptOption *receiptOption = [[PPHReceiptOption alloc] initWithBlock:^(PPHTransactionRecord *record, UIView *presentedView) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Transaction Complete"
message:[NSString stringWithFormat:@"Status: %@", [PPHPaymentConstants stringFromTransactionStatus:record.transactionStatus]]
delegate:nil cancelButtonTitle:@"Okay..."
otherButtonTitles:nil];
[alert show];
} predicate:^BOOL(PPHTransactionRecord *record) {
return YES;
} buttonLabel:@"Sample Alert"];
return @[receiptOption];
}
This sample just adds a Sample Alert option which brings up an alert box. You'll just need to modify it to say Print Receipt and connect it to your printer functions instead of bringing up an alert box.
Closing this due to inactivity. If your issue persists, please either reopen or create a new issue with additional details.
Hi Cory -- Sorry to open this issue again ( though it is slightly different issue) but related to the same thread....
Hello sir,
we are using Paypal here SDK in our app with Paypal Chip card reader ( As you suggested we have added 'Print receipt' button in getReceiptOptions() method as you suggested
I. We see Payment canceeld screen when user removes credit card while PAypal SDK is processing transaction (See attached)
we need to close this screen and go to Start screen of our App when user clicks on 'No Receipt' button we need to hide 'Print reciept' button in this screen
Could you please tell me which mthod in SDK has access to this screen ? how can we access this screen from SDK ?
II. Please see attached screen ( Declined payment screen) How can we access this screen from SDK and hide both 'print receipt' and 'No receipt' buttons.
Could you please share some code if possible....
Attached both Payment cancelled and Declined screens
Once the option is on that screen, you won't be able to remove it. If you don't want the Print Receipt option to show, then you just wouldn't add it in the first place. As for the No Receipt option, you won't be able to remove that. Similarly you can't remove the Email or Text options either.
Hi Cory,
Thanks for the quick reply.
We need to have a Print Receipt option , with this customer can print his own receipt ( we cannot remove this button)
Can we pass a String to our Print receipt option atleast if the transaction was cancelled , so that customer will know the transaction was cancelled
any other option to override this page ?
On Fri, Sep 29, 2017 at 9:37 AM, Cory notifications@github.com wrote:
Once the option is on that screen, you won't be able to remove it. If you don't want the Print Receipt option to show, then you just wouldn't add it in the first place. As for the No Receipt option, you won't be able to remove that. Similarly you can't remove the Email or Text options either.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paypal/paypal-here-sdk-ios-distribution/issues/129#issuecomment-333176047, or mute the thread https://github.com/notifications/unsubscribe-auth/APGv29s5gjFNAqTN3VU1D3FeXwg0_2QLks5snRzngaJpZM4N5Gkn .
I will answer in the other issue you have open.
Thank you very much.
Will review and advise as soon as possible,
All the best
NBaules
Get Outlookhttps://aka.ms/sdimjr for iOS_Nbaules
From: Cory notifications@github.com Sent: Saturday, September 30, 2017 1:46:02 AM To: paypal/paypal-here-sdk-ios-distribution Cc: Subscribed Subject: Re: [paypal/paypal-here-sdk-ios-distribution] Print receipt functionality on Payment complete screen (#129)
I will answer in the other issue you have open.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/paypal/paypal-here-sdk-ios-distribution/issues/129#issuecomment-333192844, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQTcdtd8pEAod04DuZhciJqIvWjzIm2Jks5snSzagaJpZM4N5Gkn.
Hello sir,
we are using Paypal here SDK in our app and we want to add "Print Receipt" button on Payment complete screen along with
1. Can we add this button on Payment complete screen like shown in attached screen ?
2. Do you guys have a some sample code (even simple steps) for this functionality ? if yes could you please share it with us ? Paypal_payment_complete_screen.pdf
We will use epson bluetooth printer