react-native-bootpay-api 13.14.3 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bootpay-api",
3
- "version": "13.14.3",
3
+ "version": "13.14.4",
4
4
  "description": "React Native를 위한 bootpay 라이브러리 입니다.",
5
5
  "main": "index.tsx",
6
6
  "main-internal": "src/index.tsx",
@@ -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
- this._isProcessingPayment = false; // 결제 처리 완료
932
- this.setState({ paymentResult: 'ERROR' });
933
- if (this.props.onError) {
934
- this.props.onError(data);
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
- this._isProcessingPayment = false; // 결제 처리 완료
941
- if (this.props.onIssued) {
942
- this.props.onIssued(data);
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
- this._isProcessingPayment = false; // 결제 처리 완료
955
- this.setState({ paymentResult: 'DONE' });
956
- if (this.props.onDone) {
957
- this.props.onDone(data);
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':