Skip to content

Commit

Permalink
Merge pull request #131 from razorpay/swift_5.2_fix
Browse files Browse the repository at this point in the history
Added typedef for RazorpayCheckout.
  • Loading branch information
Nautiyalsachin authored Apr 3, 2020
2 parents 40faf10 + 10b4563 commit 2a072c5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ios/Main.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import "Main.h"

typedef RazorpayCheckout Razorpay;

@interface Main () <RazorpayPaymentCompletionProtocolWithData, ExternalWalletSelectionProtocol> {
Razorpay *razorpay;
}
Expand All @@ -21,7 +23,11 @@ - (void)open:(CDVInvokedUrlCommand *)command {
[razorpay setExternalWalletSelectionDelegate:self];

self.callbackId = [command callbackId];
[razorpay open:options];
NSMutableDictionary * tempOptions = [[NSMutableDictionary alloc] initWithDictionary:options];
tempOptions[@"integration_version"] = CDV_VERSION;
tempOptions[@"integration"] = @"cordova";
tempOptions[@"FRAMEWORK"] = @"cordova";
[razorpay open:tempOptions];
}

- (void)onPaymentError:(int)code
Expand Down

0 comments on commit 2a072c5

Please sign in to comment.