Skip to content

Commit

Permalink
Merge pull request #98 from mediaopt/feature/36076-apple-pay
Browse files Browse the repository at this point in the history
#36076  changed for debug
  • Loading branch information
majidabbasimediaopt authored Apr 22, 2024
2 parents d52699d + 258c050 commit c8e3bbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paypal-commercetools-client",
"version": "0.1.25-alpha",
"version": "0.1.26-alpha",
"private": false,
"type": "module",
"license": "MIT",
Expand Down
6 changes: 4 additions & 2 deletions src/components/ApplePay/ApplePayMask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const ApplePayMask: React.FC<ApplePayMaskComponentProps> = (props) => {

try {
const orderId = await handleCreateOrder({
paymentSource: "apple_pay",
paymentSource: "paypal",
});
setLogs("orderId: " + orderId);

Expand All @@ -156,7 +156,7 @@ export const ApplePayMask: React.FC<ApplePayMaskComponentProps> = (props) => {
session.completePayment(applePaySession.STATUS_SUCCESS);
} catch (error) {
console.error("error", error);
setError("Error in payment authorization");
setError("Error in payment authorization" + error);
session.completePayment(applePaySession.STATUS_FAILURE);
}
};
Expand Down Expand Up @@ -257,6 +257,8 @@ export const ApplePayMask: React.FC<ApplePayMaskComponentProps> = (props) => {
<div className={ERROR_TEXT_STYLE}>{error}</div>
)}

{error && <div className={ERROR_TEXT_STYLE}>{error}</div>}

{paymentId && <div>{paymentId}</div>}
{logs && <div>{logs}</div>}
</div>
Expand Down

0 comments on commit c8e3bbe

Please sign in to comment.