react-native-bootpay-api 13.14.2 → 13.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Bootpay.tsx +1 -0
- package/src/BootpayCommerce.tsx +1 -0
- package/src/BootpayWidget.tsx +32 -15
package/package.json
CHANGED
package/src/Bootpay.tsx
CHANGED
package/src/BootpayCommerce.tsx
CHANGED
|
@@ -354,6 +354,7 @@ export class BootpayCommerce extends Component<BootpayCommerceProps> {
|
|
|
354
354
|
handleEvent('issued', this.props.onIssued);
|
|
355
355
|
break;
|
|
356
356
|
case 'close':
|
|
357
|
+
case 'bootpayWidgetRevertScreen':
|
|
357
358
|
this.showProgressBar(false);
|
|
358
359
|
this.closeDismiss();
|
|
359
360
|
break;
|
package/src/BootpayWidget.tsx
CHANGED
|
@@ -919,7 +919,7 @@ export class BootpayWidget extends Component<
|
|
|
919
919
|
|
|
920
920
|
// Payment events
|
|
921
921
|
case 'cancel':
|
|
922
|
-
this._isProcessingPayment = false;
|
|
922
|
+
this._isProcessingPayment = false;
|
|
923
923
|
this.setState({ paymentResult: 'CANCEL' });
|
|
924
924
|
if (this.props.onCancel) {
|
|
925
925
|
this.props.onCancel(data);
|
|
@@ -928,20 +928,31 @@ export class BootpayWidget extends Component<
|
|
|
928
928
|
break;
|
|
929
929
|
|
|
930
930
|
case 'error':
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
this.props.onError
|
|
931
|
+
{
|
|
932
|
+
this._isProcessingPayment = false;
|
|
933
|
+
this.setState({ paymentResult: 'ERROR' });
|
|
934
|
+
if (this.props.onError) {
|
|
935
|
+
this.props.onError(data);
|
|
936
|
+
}
|
|
937
|
+
const showError = !!this.payload?.extra?.display_error_result;
|
|
938
|
+
if (!showError) {
|
|
939
|
+
this.closeDismiss();
|
|
940
|
+
}
|
|
941
|
+
// showError이면 결과 화면 표시 후 bootpayWidgetRevertScreen으로 닫힘
|
|
935
942
|
}
|
|
936
|
-
this.closeDismiss();
|
|
937
943
|
break;
|
|
938
944
|
|
|
939
945
|
case 'issued':
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
this.props.onIssued
|
|
946
|
+
{
|
|
947
|
+
this._isProcessingPayment = false;
|
|
948
|
+
if (this.props.onIssued) {
|
|
949
|
+
this.props.onIssued(data);
|
|
950
|
+
}
|
|
951
|
+
const showSuccess = !!this.payload?.extra?.display_success_result;
|
|
952
|
+
if (!showSuccess) {
|
|
953
|
+
this.closeDismiss();
|
|
954
|
+
}
|
|
943
955
|
}
|
|
944
|
-
this.closeDismiss();
|
|
945
956
|
break;
|
|
946
957
|
|
|
947
958
|
case 'confirm':
|
|
@@ -951,12 +962,18 @@ export class BootpayWidget extends Component<
|
|
|
951
962
|
break;
|
|
952
963
|
|
|
953
964
|
case 'done':
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
this.props.onDone
|
|
965
|
+
{
|
|
966
|
+
this._isProcessingPayment = false;
|
|
967
|
+
this.setState({ paymentResult: 'DONE' });
|
|
968
|
+
if (this.props.onDone) {
|
|
969
|
+
this.props.onDone(data);
|
|
970
|
+
}
|
|
971
|
+
const showSuccess = !!this.payload?.extra?.display_success_result;
|
|
972
|
+
if (!showSuccess) {
|
|
973
|
+
this.closeDismiss();
|
|
974
|
+
}
|
|
975
|
+
// showSuccess이면 결과 화면 표시 후 bootpayWidgetRevertScreen으로 닫힘
|
|
958
976
|
}
|
|
959
|
-
this.closeDismiss();
|
|
960
977
|
break;
|
|
961
978
|
|
|
962
979
|
case 'close':
|